harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r486125 - in /harmony/enhanced/classlib/trunk/modules/misc: build.xml make/hyproperties.xml src/main/java/org/apache/harmony/misc/accessors/StringAccessor.java
Date Tue, 12 Dec 2006 13:11:47 GMT
Author: tellison
Date: Tue Dec 12 05:11:46 2006
New Revision: 486125

URL: http://svn.apache.org/viewvc?view=rev&rev=486125
Log:
Apply patch HARMONY-2616 ([classlib][misc] StringAccessor.getChars(long, long, String, int,
int) doesn't set trailing zero)

Modified:
    harmony/enhanced/classlib/trunk/modules/misc/build.xml
    harmony/enhanced/classlib/trunk/modules/misc/make/hyproperties.xml
    harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/StringAccessor.java

Modified: harmony/enhanced/classlib/trunk/modules/misc/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/misc/build.xml?view=diff&rev=486125&r1=486124&r2=486125
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/misc/build.xml (original)
+++ harmony/enhanced/classlib/trunk/modules/misc/build.xml Tue Dec 12 05:11:46 2006
@@ -37,6 +37,8 @@
         </or>
     </fileset>
 
+    <property file="../../make/depends.properties" />
+
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -161,11 +163,9 @@
     </target>
 
     <target name="run-tests">
-
         <mkdir dir="${hy.tests.reports}" />
 
         <property name="test.jre.home" value="${hy.jdk}/jre" />
-
         <junit fork="yes"
                forkmode="${hy.test.forkmode}"
                timeout="${hy.test.timeout}"
@@ -177,6 +177,8 @@
                jvm="${test.jre.home}/bin/java">
             <jvmarg line="${hy.test.vmargs}" />
 
+            <jvmarg value="-Xbootclasspath/a:${hy.misc.bin.test}${path.separator}${basedir}/../../${junit.jar}"/>
+
             <classpath>
                 <pathelement path="${hy.misc.bin.test}"/>
             </classpath>
@@ -189,7 +191,9 @@
             <batchtest todir="${hy.tests.reports}" haltonfailure="no"
                 unless="test.case">
 
-                <fileset dir="${hy.misc.src.test.java}"/>
+                <fileset dir="${hy.misc.src.test.java}">
+                    <include name="**/*Test.java" />
+                </fileset>
             </batchtest>
         </junit>
         <antcall target="touch-failures-file" />

Modified: harmony/enhanced/classlib/trunk/modules/misc/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/misc/make/hyproperties.xml?view=diff&rev=486125&r1=486124&r2=486125
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/misc/make/hyproperties.xml (original)
+++ harmony/enhanced/classlib/trunk/modules/misc/make/hyproperties.xml Tue Dec 12 05:11:46
2006
@@ -25,7 +25,7 @@
             <resources location="src/main/resources" />
          </main>
          <test>
-            <java location="src/test/java" />
+            <java location="src/test/java/common" />
             <resources location="src/test/resources" />
          </test>
          <natives location="src/natives" />

Modified: harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/StringAccessor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/StringAccessor.java?view=diff&rev=486125&r1=486124&r2=486125
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/StringAccessor.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/StringAccessor.java
Tue Dec 12 05:11:46 2006
@@ -126,7 +126,7 @@
     public long getChars(long buf, long buflen, String str, int start, int len) {
         String substr = str.substring(start, start + len);
         long addr = getChars(substr);
-        Malloc.memcpy(buf, addr, Math.min(buflen, substr.length() * 2));
+        Malloc.memcpy(buf, addr, Math.min(buflen, (substr.length() + 1) * 2));
         Malloc.free(addr);
         return buf;
     }



Mime
View raw message