harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r798469 [28/28] - in /harmony/enhanced/classlib/branches/java6: ./ depends/build/platform/ depends/files/ depends/jars/ depends/manifests/icu4j_4.0/ depends/manifests/icu4j_4.2.1/ depends/manifests/icu4j_4.2.1/META-INF/ make/ modules/access...
Date Tue, 28 Jul 2009 09:30:48 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/suncompat/src/main/java/sun/misc/Unsafe.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/suncompat/src/main/java/sun/misc/Unsafe.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/suncompat/src/main/java/sun/misc/Unsafe.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/suncompat/src/main/java/sun/misc/Unsafe.java Tue Jul 28 09:30:33 2009
@@ -177,6 +177,22 @@
     }
 
     /**
+     * Writes an int value to an Object's field using ordered
+     * setting. Ordered setting of a field is equivalent to the
+     * volatile setting of that field except that it does not ensure
+     * that the change is immediately available to other threads.
+     * 
+     * @param object The instance containing the field to write to.
+     * @param fieldOffset The offset of the int field in the object.
+     * @param newValue The value to write.
+     */
+    public void putOrderedInt(Object object, long fieldOffset,
+                              int newValue) {
+        // should probably implement less strict implementation
+        putIntVolatile(object, fieldOffset, newValue);
+    }
+
+    /**
      * <p>
      * Writes an int value to an Object's field as though it were declared
      * <code>volatile</code>.
@@ -205,6 +221,22 @@
     }
 
     /**
+     * Writes a long value to an Object's field using ordered
+     * setting. Ordered setting of a field is equivalent to the
+     * volatile setting of that field except that it does not ensure
+     * that the change is immediately available to other threads.
+     * 
+     * @param object The instance containing the field to write to.
+     * @param fieldOffset The offset of the field to write to.
+     * @param newValue The value to write.
+     */
+    public void putOrderedLong(Object object, long fieldOffset,
+                               long newValue) {
+        // should probably implement less strict implementation
+        putLongVolatile(object, fieldOffset, newValue);
+    }
+
+    /**
      * <p>
      * Writes a long value to an Object's field as though it were declared
      * <code>volatile</code>.
@@ -234,6 +266,38 @@
 
     /**
      * <p>
+     * Writes an Object reference value to an Object's field.
+     * </p>
+     * 
+     * @param object The instance containing the field to write to.
+     * @param fieldOffset The offset of the field to write to.
+     * @param newValue The value to write.
+     */
+    public void putObject(Object object, long fieldOffset,
+                          Object newValue) {
+        // should probably implement less strict implementation
+        putOrderedObject(object, fieldOffset, newValue);
+    }
+
+    /**
+     * Writes an Object reference value to an Object's field using
+     * ordered setting. Ordered setting of a field is equivalent to
+     * the volatile setting of that field except that it does not
+     * ensure that the change is immediately available to other
+     * threads.
+     * 
+     * @param object The instance containing the field to write to.
+     * @param fieldOffset The offset of the field to write to.
+     * @param newValue The value to write.
+     */
+    public void putOrderedObject(Object object, long fieldOffset,
+                                 Object newValue) {
+        // should probably implement less strict implementation
+        putObjectVolatile(object, fieldOffset, newValue);
+    }
+
+    /**
+     * <p>
      * Writes an Object reference value to an Object's field as though it were
      * declared <code>volatile</code>.
      * </p>

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/build.xml Tue Jul 28 09:30:33 2009
@@ -19,40 +19,12 @@
 <project name="SWING Build" default="build" basedir=".">
     <description>Build for SWING component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="swing" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
-    <property name="tests.output" location="../../build/test_report" />
-
-    <!-- set global properties for this build. -->
-    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
-    <property name="hy.swing.src.main.java.platform"
-              value="${hy.swing.src.main.java}/../${hy.os.family}" />
-
-    <property name="hy.swing.src.test.java.platform"
-              value="${hy.swing.src.test.java}/../${hy.os.family}" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.swing.src.main.java}" />
-            <present targetdir="${hy.swing.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-            <present targetdir="${hy.swing.src.main.java.platform}" />
-            <present targetdir="${hy.swing.src.main.java.platform}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <!-- List of private classes that cannot be mapped by above mappers -->
-    <fileset id="hidden.classes" dir="${hy.build}">
+    <fileset id="hidden.classes" dir="../../build/classes">
         <include name="javax/swing/text/html/parser/ModelElement.class"/>
         <include name="javax/swing/text/html/parser/Asn1ModelElement.class"/>
         <include name="javax/swing/text/html/parser/Asn1ModelElement$1.class"/>
@@ -61,8 +33,6 @@
 
     <property file="../../make/depends.properties" />
 
-    <property name="swing.exclude.file" location="${hy.hdk}/build/swing.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -77,11 +47,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, prepare-exclude, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.swing.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.swing.packaging.jarname}-src.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/swing.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/swing-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
             <fileset refid="hidden.classes"/>
@@ -92,10 +63,10 @@
     <target name="compile-java">
         <echo message="Compiling SWING classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               destdir="${hy.build}"
+               destdir="../../build/classes"
                compiler="${hy.javac.compiler}"
                memoryMaximumSize="${hy.javac.maxmem}"
                source="${hy.javac.source}" 
@@ -105,8 +76,8 @@
             <compilerarg line="${build.compilerarg}" />
 
             <src>
-                <pathelement location="${hy.swing.src.main.java}"/>
-                <pathelement location="${hy.swing.src.main.java.platform}" />
+                <pathelement location="src/main/java/common"/>
+                <pathelement location="src/main/java/${hy.os.family}" />
             </src>
 
             <bootclasspath>
@@ -118,17 +89,17 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.swing.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java/common">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
     </target>
 
     <target name="build-jar" depends="svn-info">
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.swing.packaging.jarname}.jar"
-             manifest="${hy.swing}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/swing.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <fileset refid="hidden.classes" />
@@ -139,8 +110,8 @@
             <metainf refid="hy.required.metainf-files"/>
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.swing.packaging.jarname}-src.jar">
-            <fileset dir="${hy.swing.src.main.java}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/swing-src.jar">
+            <fileset dir="src/main/java/common" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -149,91 +120,49 @@
         </jar>
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling SWING tests" />
-
-        <mkdir dir="${hy.swing.bin.test}" />
-
-        <javac srcdir="${hy.swing.src.test.api}/java.injected"
-               destdir="${hy.swing.bin.test}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <compilerarg line="${build.compilerarg}" />
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="../../build/tests" />
-            <classpath location="${hy.hdk}/build/test/support.jar" /> 
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="swing" dir="./make"
-                             result="${swing.exclude.file}"/>
-    </target>
-
-    <target name="run-tests" depends="compile-tests,copy-test-resources">
-
-        <mkdir dir="${tests.output}" />
-
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-            <jvmarg line="${hy.test.vmargs}" />
-
-            <formatter type="xml" />
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
+        
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/swing_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-            <jvmarg value="-Xbootclasspath/a:${hy.swing.bin.test}${path.separator}../../${junit.jar}${path.separator}${hy.hdk}/build/test/support.jar"/>
-<!--            <jvmarg value="-Djava2d.opengl=true"/> -->
+        <mkdir dir="${tests.excludes.hdk.dir}"/>
+        <copy todir="${tests.excludes.hdk.dir}">
+            <fileset dir="make" includes="exclude*"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
 
-            <batchtest todir="${tests.output}" haltonfailure="no" >
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
 
-                <fileset dir="${hy.swing.src.test.api}/java.injected">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${swing.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">swing${line.separator}</echo>
     </target>
 
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">swing${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="swing tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/api/java.injected" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.swing.bin.test}" />
-        <copy todir="${hy.swing.bin.test}" includeemptydirs="false">
-            <fileset dir="${hy.swing.src.test.resources}">
-                <exclude name="**/*.java" />
-            </fileset>
-        </copy>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java Tue Jul 28 09:30:33 2009
@@ -1107,7 +1107,7 @@
 
     protected int xPositionForValue(final int value) {
         // Changed according to JIRA 4445
-        double valueToSizeRatio = (double) value
+        double valueToSizeRatio = (double) (value - slider.getMinimum())
                 / (double) (slider.getMaximum() - slider.getMinimum());
 
         if ((drawInverted() ^ !slider.getComponentOrientation().isLeftToRight())) {
@@ -1120,7 +1120,7 @@
 
     protected int yPositionForValue(final int value) {
         // Changed according to JIRA 4445
-        double valueToSizeRatio = (double) value
+        double valueToSizeRatio = (double) (value - slider.getMinimum())
                 / (double) (slider.getMaximum() - slider.getMinimum());
 
         if ((drawInverted() ^ (!slider.getComponentOrientation()

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 28 09:30:33 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-790471
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-798021

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 28 09:30:33 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-790471
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-798021

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/text/parser/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 28 09:30:33 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-790471
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-798021

Modified: harmony/enhanced/classlib/branches/java6/modules/text/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/build.xml Tue Jul 28 09:30:33 2009
@@ -19,27 +19,11 @@
 <project name="TEXT Build" default="build" basedir=".">
     <description>Build for TEXT component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="text" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
-    <property name="tests.output" location="../../build/test_report" />
-
-    <!-- set global properties for this build. -->
-    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.text.src.main.java}" />
-            <present targetdir="${hy.text.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-    
-    <property name="text.exclude.file" location="${hy.hdk}/build/text.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
@@ -55,11 +39,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
     
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/text.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/text-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -69,11 +54,11 @@
     <target name="compile-java">
         <echo message="Compiling TEXT classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-            srcdir="${hy.text.src.main.java}"
-            destdir="${hy.build}"
+            srcdir="src/main/java"
+            destdir="../../build/classes"
                compiler="${hy.javac.compiler}"
                memoryMaximumSize="${hy.javac.maxmem}"
                source="${hy.javac.source}" 
@@ -91,9 +76,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.text.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -101,7 +86,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/text.jar"
-             manifest="${hy.text}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -112,7 +97,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/text-src.jar">
-            <fileset dir="${hy.text.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -121,97 +106,48 @@
         </jar>
     </target>
 
-    <target name="compile-tests" depends="copy-test-resources">
-        <echo message="Compiling TEXT tests" />
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
 
-        <mkdir dir="${hy.text.bin.test}" />
-
-        <javac srcdir="${hy.text.src.test.java}"
-            destdir="${hy.text.bin.test}"
-            sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <compilerarg line="${build.compilerarg}" />
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="text" dir="./make"
-                             result="${text.exclude.file}"/>
-    </target>
-
-    <target name="run-tests">
-
-        <mkdir dir="${tests.output}" />
-
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <assertions enableSystemAssertions="true">
-                <enable />
-            </assertions>
-
-            <jvmarg line="${hy.test.vmargs}" />
-
-            <classpath>
-                <pathelement path="${hy.text.bin.test}"/>
-            </classpath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-
-            <formatter type="xml" />
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/text_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-            <batchtest todir="${tests.output}" haltonfailure="no" >
+        <mkdir dir="${tests.excludes.hdk.dir}"/>
+        <copy todir="${tests.excludes.hdk.dir}">
+            <fileset dir="make" includes="exclude*"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
 
-                <fileset dir="${hy.text.src.test.java}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${text.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">text${line.separator}</echo>
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
     </target>
 
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">text${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="text tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.text.bin.test}" />
-        <copy todir="${hy.text.bin.test}" includeemptydirs="false">
-            <fileset dir="${hy.text.src.test.resources}">
-                <exclude name="**/*.java" />
-            </fileset>
-        </copy>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/AttributedCharacterIterator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/AttributedCharacterIterator.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/AttributedCharacterIterator.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/AttributedCharacterIterator.java Tue Jul 28 09:30:33 2009
@@ -89,10 +89,7 @@
          */
         @Override
         public final boolean equals(Object object) {
-            if (object == null || !(object.getClass().equals(this.getClass()))) {
-                return false;
-            }
-            return name.equals(((Attribute) object).name);
+            return this == object;
         }
 
         /**
@@ -113,7 +110,7 @@
          */
         @Override
         public final int hashCode() {
-            return name.hashCode();
+            return super.hashCode();
         }
 
         /**
@@ -129,13 +126,13 @@
                 // text.0C=cannot resolve subclasses
                 throw new InvalidObjectException(Messages.getString("text.0C")); //$NON-NLS-1$
             }
-            if (this.equals(INPUT_METHOD_SEGMENT)) {
+            if (this.getName().equals(INPUT_METHOD_SEGMENT.getName())) {
                 return INPUT_METHOD_SEGMENT;
             }
-            if (this.equals(LANGUAGE)) {
+            if (this.getName().equals(LANGUAGE.getName())) {
                 return LANGUAGE;
             }
-            if (this.equals(READING)) {
+            if (this.getName().equals(READING.getName())) {
                 return READING;
             }
             // text.02=Unknown attribute

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/DateFormat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/DateFormat.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/DateFormat.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/DateFormat.java Tue Jul 28 09:30:33 2009
@@ -928,10 +928,16 @@
          */
         @Override
         protected Object readResolve() throws InvalidObjectException {
+        	if (this.getClass() != Field.class) {
+                // text.0C=cannot resolve subclasses
+                throw new InvalidObjectException(Messages.getString("text.0C")); //$NON-NLS-1$
+            }
+        	
             if (calendarField != -1) {
                 try {
                     Field result = ofCalendarField(calendarField);
-                    if (result != null && this.equals(result)) {
+                    
+                    if (result != null && this.getName().equals(result.getName())) {
                         return result;
                     }
                 } catch (IllegalArgumentException e) {

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java Tue Jul 28 09:30:33 2009
@@ -80,7 +80,7 @@
      * @tests java.text.DecimalFormatSymbols#getAvailableLocales()
      */
     public void test_getAvailableLocales_correct_provider() throws Exception {
-        URL path = new File("src/test/resources/provider/correct").toURL();
+        URL path = new File("resources/provider/correct").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
                 new URL[] { path }) {
             @Override
@@ -109,7 +109,7 @@
      * @tests java.text.DecimalFormatSymbols#getAvailableLocales()
      */
     public void test_getAvailableLocales_wrong_provider() throws Exception {
-        URL path = new File("src/test/resources/provider/wrong").toURL();
+        URL path = new File("resources/provider/wrong").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
                 new URL[] { path }) {
             @Override
@@ -184,7 +184,7 @@
      */
     public void test_getInstanceLjava_util_Locale_correct_provider()
             throws Exception {
-        URL path = new File("src/test/resources/provider/correct").toURL();
+        URL path = new File("resources/provider/correct").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
                 new URL[] { path }) {
             @Override
@@ -206,7 +206,7 @@
      */
     public void test_getInstanceLjava_util_Locale_wrong_provider()
             throws Exception {
-        URL path = new File("src/test/resources/provider/wrong").toURL();
+        URL path = new File("resources/provider/wrong").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
                 new URL[] { path }) {
             @Override
@@ -254,7 +254,7 @@
                 "KR"));
         assertTrue("Test1: Returned incorrect currency",
                 dfs1.getCurrency() == currK);
-        assertEquals("Test1: Returned incorrect currencySymbol", "\uffe6", dfs1
+        assertEquals("Test1: Returned incorrect currencySymbol", "\u20a9", dfs1
                 .getCurrencySymbol());
         assertEquals("Test1: Returned incorrect intlCurrencySymbol", "KRW",
                 dfs1.getInternationalCurrencySymbol());
@@ -262,7 +262,7 @@
         dfs1 = new DecimalFormatSymbols(new Locale("", "KR"));
         assertTrue("Test2: Returned incorrect currency",
                 dfs1.getCurrency() == currK);
-        assertEquals("Test2: Returned incorrect currencySymbol", "KRW", dfs1
+        assertEquals("Test2: Returned incorrect currencySymbol", "\u20a9", dfs1
                 .getCurrencySymbol());
         assertEquals("Test2: Returned incorrect intlCurrencySymbol", "KRW",
                 dfs1.getInternationalCurrencySymbol());

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/FieldPositionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/FieldPositionTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/FieldPositionTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/FieldPositionTest.java Tue Jul 28 09:30:33 2009
@@ -165,14 +165,13 @@
 		FieldPosition fpos = new FieldPosition(1);
 		fpos.setBeginIndex(5);
 		fpos.setEndIndex(110);
-		assertEquals("hashCode returned incorrect value", 620, fpos.hashCode());
+		fpos.hashCode();
 
 		FieldPosition fpos2 = new FieldPosition(
 				DateFormat.Field.DAY_OF_WEEK_IN_MONTH);
 		fpos2.setBeginIndex(5);
 		fpos2.setEndIndex(110);
-		assertEquals("hashCode returned incorrect value", 451685956, fpos2
-				.hashCode());
+		fpos2.hashCode();
 	}
 
 	/**

Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml Tue Jul 28 09:30:33 2009
@@ -19,30 +19,12 @@
 <project name="X-NET Build" default="build" basedir=".">
     <description>Build for X-NET component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="x-net" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
-    <property name="tests.output" location="../../build/test_report" />
-
-    <!-- set global properties for this build. -->
-    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.x-net.src.main.java}" />
-            <present targetdir="${hy.x-net.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <property file="../../make/depends.properties" />
 
-    <property name="x-net.exclude.file" location="${hy.hdk}/build/x-net.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -57,11 +39,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.x-net.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.x-net.packaging.jarname}-src.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/x-net.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/x-net-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -71,11 +54,11 @@
     <target name="compile-java">
         <echo message="Compiling X-NET classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.x-net.src.main.java}"
-               destdir="${hy.build}"
+               srcdir="src/main/java"
+               destdir="../../build/classes"
                compiler="${hy.javac.compiler}"
                memoryMaximumSize="${hy.javac.maxmem}"
                source="${hy.javac.source}" 
@@ -93,17 +76,17 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.x-net.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
     </target>
 
     <target name="build-jar" depends="svn-info">
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.x-net.packaging.jarname}.jar"
-             manifest="${hy.x-net}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/x-net.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -113,8 +96,8 @@
             <metainf refid="hy.required.metainf-files"/>
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.x-net.packaging.jarname}-src.jar">
-            <fileset dir="${hy.x-net.src.main.java}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/x-net-src.jar">
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -123,195 +106,100 @@
         </jar>
     </target>
 
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
+
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+
+        <jar destfile="${tests.hdk.dir}/x-net_test_support.jar">
+            <fileset dir="bin/test/support" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+
+        <jar destfile="${tests.hdk.dir}/x-net_api_tests.jar">
+            <fileset dir="bin/test/api" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+
+        <jar destfile="${tests.hdk.dir}/x-net_impl_boot_tests.jar">
+            <fileset dir="bin/test/impl.injected" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+        <jar destfile="${tests.hdk.dir}/x-net_impl_tests.jar">
+            <fileset dir="bin/test/impl" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+
+        <mkdir dir="${tests.excludes.hdk.dir}" />
+        <copy todir="${tests.excludes.hdk.dir}">
+            <fileset dir="make" includes="exclude*"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
+
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
+
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+    </target>
+
     <target name="compile-tests">
 
-        <compile-tests description="test support files" destdir="../../build/tests">
+        <compile-tests description="x-net test support files"
+                       destdir="bin/test/support">
             <javac-elements>
                 <src>
-                    <pathelement location="${hy.x-net.src.test}/support/common/java" />
+                    <pathelement location="src/test/support/common/java" />
                 </src>
 
                 <include name="**/*.java" />
             </javac-elements>
         </compile-tests>
         
-        <compile-tests description="api tests" destdir="${hy.x-net.bin.test}/api">
+        <compile-tests description="x-net api tests" destdir="bin/test/api">
             <javac-elements>
-                <src path="${hy.x-net.src.test}/api/java"/>
-                <src path="${hy.x-net.src.test}/java"/>
+                <classpath location="bin/test/support" />
+                <src path="src/test/api/java"/>
+                <src path="src/test/java"/>
                 <include name="**/*Test.java" />
             </javac-elements>
         </compile-tests>
 
-        <compile-tests description="impl injected tests" destdir="${hy.x-net.bin.test}/impl.injected">
+        <compile-tests description="x-net impl injected tests"
+                       destdir="bin/test/impl.injected">
             <javac-elements>
-                <src path="${hy.x-net.src.test}/impl/java.injected"/>
+                <classpath location="bin/test/support" />
+                <src path="src/test/impl/java.injected"/>
                 <include name="**/*Test.java" />
             </javac-elements>
         </compile-tests>
         
-        <compile-tests description="impl tests" destdir="${hy.x-net.bin.test}/impl">
+        <compile-tests description="x-net impl tests" destdir="bin/test/impl">
             <javac-elements>
-                <src path="${hy.x-net.src.test}/impl/java"/>
+                <src path="src/test/impl/java"/>
                 <include name="**/*Test.java" />
             </javac-elements>
         </compile-tests>
     </target>
 
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="x-net" dir="./make"
-                             result="${x-net.exclude.file}"/>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
-    <target name="run-tests" depends="run-tests-api, run-tests-impl" />
-
-    <target name="run-tests-api">
-
-        <run-tests description="api tests">
-            <junit-elements>
-
-                <classpath>
-                    <pathelement path="${hy.x-net.bin.test}/api"/>
-                    <pathelement path="${hy.hdk}/build/test/support.jar" />
-                    <pathelement path="../../build/tests" />
-                </classpath>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.x-net.src.test}/api/java">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${x-net.exclude.file}" unless="test.case" />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
-
-    <target name="run-tests-impl" unless="test.noimpl">
-        <run-tests description="impl tests">
-            <junit-elements>
-                <classpath>
-                    <pathelement path="${hy.x-net.bin.test}/impl"/>
-                    <pathelement path="${hy.hdk}/build/test/support.jar" />
-                </classpath>
-                
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.x-net.src.test}/impl/java">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${x-net.exclude.file}" unless="test.case" />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-        <run-tests description="impl injected tests">
-            <junit-elements>
-                <!-- to pick up junit.jar               -->
-                <jvmarg value="-Xbootclasspath/a:${hy.x-net.bin.test}/impl.injected${path.separator}../../${junit.jar}${path.separator}../../build/tests${path.separator}${hy.hdk}/build/test/support.jar"/>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.x-net.src.test}/impl/java.injected">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${x-net.exclude.file}" unless="test.case" />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
-
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">x-net${line.separator}</echo>
-    </target>
-
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">x-net${line.separator}</echo>
-    </target>
-    
-    <macrodef name="compile-tests">
-        <attribute name="description" default="" />
-        <attribute name="destdir"  />
-        <element name="javac-elements" />
-        <sequential>
-            <echo message="Compiling X-NET @{description}" />
-            
-            <mkdir dir="@{destdir}" />
-            
-            <javac destdir="@{destdir}"
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-                <javac-elements />
-
-                <compilerarg line="${build.compilerarg}" />
-
-                <bootclasspath>
-                    <fileset dir="${hy.jdk}/jre/lib/boot">
-                        <include name="**/*.jar" />
-                    </fileset>
-                </bootclasspath>
-                <classpath location="../../build/tests" />
-                <classpath location="${hy.hdk}/build/test/support.jar" />
-            </javac>
-        </sequential>
-    </macrodef>
-    
-    <macrodef name="run-tests">
-        <attribute name="description" default="" />
-        <element name="junit-elements" />
-        <sequential>
-            <echo message="Running X-NET @{description}" />
-
-            <mkdir dir="${tests.output}" />
-
-            <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-            <junit fork="yes"
-                   forkmode="${hy.test.forkmode}"
-                   timeout="${hy.test.timeout}"
-                   printsummary="withOutAndErr"
-                   errorproperty="test.errors"
-                   failureproperty="test.failures"
-                   showoutput="on"
-                   dir="${basedir}"
-                   jvm="${test.jre.home}/bin/java">
-
-                <assertions enableSystemAssertions="true">
-                    <enable />
-                </assertions>
-
-                <jvmarg line="${hy.test.vmargs}" />
-
-                <junit-elements />
-
-                <classpath>
-                    <pathelement path="${hy.x-net.src.test.resources}"/>
-                    <pathelement path="../../build/tests" />
-                </classpath>
-
-                <formatter type="xml" />
-            </junit>
-        </sequential>
-    </macrodef>
-
 </project>

Modified: harmony/enhanced/classlib/branches/java6/support/src/test/java/tests/support/Support_HttpTests.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/support/src/test/java/tests/support/Support_HttpTests.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/support/src/test/java/tests/support/Support_HttpTests.java (original)
+++ harmony/enhanced/classlib/branches/java6/support/src/test/java/tests/support/Support_HttpTests.java Tue Jul 28 09:30:33 2009
@@ -257,9 +257,9 @@
 			connector.open(postTestUrl);
 			connector.setRequestProperty("Content-Length", "10");
 			os = connector.getOutputStream();
-			os.write(message1.getBytes());
+			os.write(message1.getBytes("ISO8859_1"));
 			os.flush();
-			os.write(message2.getBytes());
+			os.write(message2.getBytes("ISO8859_1"));
 			os.close();
 			is = connector.getInputStream();
 			len = 0;



Mime
View raw message