harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r544465 - in /harmony/enhanced/classlib/branches/java6: depends/files/ depends/jars/ make/ modules/luni/src/main/java/java/io/ modules/luni/src/test/java/tests/api/java/io/
Date Tue, 05 Jun 2007 12:15:41 GMT
Author: pyang
Date: Tue Jun  5 05:15:40 2007
New Revision: 544465

URL: http://svn.apache.org/viewvc?view=rev&rev=544465
Log:
Apply original changes in old Java 6 branch, more specifically, the changes from r529538 to
r522440 of https://svn.apache.org/repos/asf/harmony/enhanced/classlib/archive/java6

Modified:
    harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties
    harmony/enhanced/classlib/branches/java6/depends/jars/   (props changed)
    harmony/enhanced/classlib/branches/java6/make/build-java.xml
    harmony/enhanced/classlib/branches/java6/make/depends.properties
    harmony/enhanced/classlib/branches/java6/make/depends.xml
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintStreamTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintWriterTest.java

Modified: harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties (original)
+++ harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties Tue Jun
 5 05:15:40 2007
@@ -193,12 +193,17 @@
 bootclasspath.source.46=pack200-src.jar
 bootclasspath.source.packageroot.46=/
 
+# The following JARs are from XML Security
+bootclasspath.47=xmlsec-1.4.0/commons-logging.jar
+bootclasspath.48=xmlsec-1.4.0/xmlsec-1.4.0.jar
+
+
 #
 #  Sun compatibility
 #
 #  Uncomment the three lines below to include additional
 #  compatiblity types.
 #
-#bootclasspath.47=suncompat.jar
-#bootclasspath.source.47=suncompat-src.jar
-#bootclasspath.source.packageroot.47=/
+#bootclasspath.49=suncompat.jar
+#bootclasspath.source.49=suncompat-src.jar
+#bootclasspath.source.packageroot.49=/

Propchange: harmony/enhanced/classlib/branches/java6/depends/jars/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jun  5 05:15:40 2007
@@ -22,3 +22,4 @@
 yoko_M2-20070130
 xerces_2.9.0
 bcprov-jdk15-136
+xmlsec_1.4.0

Modified: harmony/enhanced/classlib/branches/java6/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-java.xml?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-java.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-java.xml Tue Jun  5 05:15:40 2007
@@ -239,6 +239,25 @@
 		<fileset dir="${hy.jdk}/jre/lib/boot/xerces-2_9_0"/>
 	</move>
 
+	<!-- Unzip xmlsec jars -->
+	<mkdir dir="${hy.jdk}/jre/lib/boot/xmlsec-1.4.0" />
+	<unzip src="${depends.jars}/xmlsec_1.4.0/xmlsec.zip"
+	       dest="${hy.jdk}/jre/lib/boot" >
+		<patternset>
+			<include name="xml-security-1_4_0/libs/xmlsec-1.4.0.jar" />
+			<include name="xml-security-1_4_0/libs/commons-logging.jar" />
+		</patternset>
+
+                <!-- mapper type="flatten" / -->
+	</unzip>
+
+        <!-- TODO: remove this when switch to next ant version -->
+	<move todir="${hy.jdk}/jre/lib/boot/xmlsec-1.4.0">
+		<fileset dir="${hy.jdk}/jre/lib/boot/xml-security-1_4_0/libs"/>
+	</move>
+        <delete dir="${hy.jdk}/jre/lib/boot/xml-security-1_4_0" />
+
+
         <!-- delete these lines if BC version is greater than jdk15-134 -->
         <!-- delete the original signed.bcprov.jar                      -->
         <delete file="${hy.jdk}/jre/lib/ext/signed.bcprov.jar" />

Modified: harmony/enhanced/classlib/branches/java6/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.properties?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.properties (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.properties Tue Jun  5 05:15:40 2007
@@ -28,6 +28,11 @@
 xerces.url=http://www.apache.org/dist/xml/xerces-j/Xerces-J-bin.2.9.0.zip
 xerces.md5=a3aece3feb68be6d319072b85ad06023
 
+xmlsec.dir=${depends.jars}/xmlsec_1.4.0
+xmlsec.zip=${xmlsec.dir}/xmlsec.zip
+xmlsec.url=http://xml.apache.org/security/dist/java-library/xml-security-bin-1_4_0.zip
+xmlsec.md5=79ffece964a40d33fb25f3f7a8e83f6b
+
 junit.dir=${depends.jars}/junit_3.8.2
 junit.jar=${junit.dir}/junit.jar
 junit.url=${mirror.base}/junit/junit/3.8.2/junit-3.8.2.jar

Modified: harmony/enhanced/classlib/branches/java6/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.xml?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.xml Tue Jun  5 05:15:40 2007
@@ -39,6 +39,7 @@
         <check-one-file src="${bcel.url}" dest="${bcel.jar}" />
         <check-one-file src="${xalan.url}" dest="${xalan.jar}" />
         <check-one-file src="${xerces.url}" dest="${xerces.zip}" />
+        <check-one-file src="${xmlsec.url}" dest="${xmlsec.zip}" />
         <check-one-file src="${junit.url}" dest="${junit.jar}" />
         <check-one-file src="${bcprov.url}" dest="${bcprov.jar}" />
         <check-one-file src="${icu4j.url}" dest="${icu4j.jar}" />
@@ -311,6 +312,10 @@
     <mkdir dir="${xerces.dir}" />
     <download-one-file src="${xerces.url}" dest="${xerces.zip}"
                            md5="${xerces.md5}" />
+
+    <mkdir dir="${xmlsec.dir}" />
+    <download-one-file src="${xmlsec.url}" dest="${xmlsec.zip}"
+                           md5="${xmlsec.md5}" />
 
     <mkdir dir="${junit.dir}" />
     <download-one-file src="${junit.url}" dest="${junit.jar}"

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintStream.java
Tue Jun  5 05:15:40 2007
@@ -232,6 +232,15 @@
         }
         return ioError;
     }
+    
+    /**
+     * Sets the error state of the stream to false.
+     * 
+     * @since 1.6
+     */
+    protected void clearError() {
+        ioError = false;
+    }
 
     /**
      * Close this PrintStream. This implementation flushes and then closes the

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/PrintWriter.java
Tue Jun  5 05:15:40 2007
@@ -202,6 +202,17 @@
         }
         return ioError;
     }
+    
+    /**
+     * Sets the error state of the stream to false.
+     * 
+     * @since 1.6
+     */
+    protected void clearError() {
+        synchronized (lock) {
+            ioError = false;
+        }
+    }
 
     /**
      * Close this PrintWriter. This implementation flushes and then closes the

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintStreamTest.java?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintStreamTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintStreamTest.java
Tue Jun  5 05:15:40 2007
@@ -53,7 +53,12 @@
 		public MockPrintStream(OutputStream os) {
 			super(os);
 		}
-		
+        
+        @Override
+        public void clearError() {
+            super.clearError();
+        }
+        
 		@Override
 		public void setError() {
 			super.setError();
@@ -126,6 +131,19 @@
         assertTrue("Checkerror should return true", os.checkError());
     }
 
+    /**
+     * @tests {@link java.io.PrintStream#clearError()} 
+     */
+    public void test_clearError() throws FileNotFoundException {        
+        MockPrintStream os = new MockPrintStream(testFilePath);     
+        assertFalse(os.checkError());
+        os.setError();
+        assertTrue(os.checkError());
+        os.clearError();
+        assertFalse(os.checkError());
+        os.close();
+    }
+    
     /**
      * @tests java.io.PrintStream#close()
      */

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintWriterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintWriterTest.java?view=diff&rev=544465&r1=544464&r2=544465
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintWriterTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PrintWriterTest.java
Tue Jun  5 05:15:40 2007
@@ -22,6 +22,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.PrintWriter;
 import java.nio.charset.Charset;
 import java.util.Locale;
@@ -36,6 +37,22 @@
 			return "Bogus";
 		}
 	}
+    
+    /**
+     * @since 1.6
+     */
+    static class MockPrintWriter extends PrintWriter {
+
+        public MockPrintWriter(OutputStream out, boolean autoflush) {
+            super(out, autoflush);
+        }
+
+        @Override
+        public void clearError() {
+            super.clearError();
+        }
+
+    }
 
 	PrintWriter pw;
 
@@ -184,6 +201,20 @@
 		assertTrue("Failed to return error", pw.checkError());
 	}
 
+    /**
+     * @tests java.io.PrintWriter#clearError()
+     * @since 1.6
+     */
+    public void test_clearError() {
+        // Test for method boolean java.io.PrintWriter.clearError()
+        MockPrintWriter mpw = new MockPrintWriter(new ByteArrayOutputStream(), false);
+        mpw.close();
+        mpw.print(490000000000.08765);
+        assertTrue("Failed to return error", mpw.checkError());
+        mpw.clearError();
+        assertFalse("Internal error state has not be cleared", mpw.checkError());
+    }
+    
 	/**
 	 * @tests java.io.PrintWriter#close()
 	 */



Mime
View raw message