harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r1005476 [2/2] - in /harmony/enhanced/java/branches/mrh: ./ classlib/ classlib/modules/archive/src/main/java/java/util/zip/ classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ classlib/modules/beans/src/ma...
Date Thu, 07 Oct 2010 14:56:08 GMT
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/java/common/java/security/Permissions.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/java/common/java/security/Permissions.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/java/common/java/security/Permissions.java
(original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/java/common/java/security/Permissions.java
Thu Oct  7 14:56:06 2010
@@ -214,16 +214,14 @@ public final class Permissions extends P
         ObjectInputStream.GetField fields = in.readFields();
         Map perms = (Map)fields.get("perms", null); //$NON-NLS-1$
         klasses = new HashMap();
-        synchronized (klasses) {
-            for (Iterator iter = perms.entrySet().iterator(); iter.hasNext();) {
-                Map.Entry entry = (Map.Entry)  iter.next();
-                Class key = (Class) entry.getKey();
-                PermissionCollection pc = (PermissionCollection) entry.getValue();
-                if (key != pc.elements().nextElement().getClass()) {
-                    throw new InvalidObjectException(Messages.getString("security.22"));
//$NON-NLS-1$
-                }
-                klasses.put(key, pc);
+        for (Iterator iter = perms.entrySet().iterator(); iter.hasNext();) {
+            Map.Entry entry = (Map.Entry)  iter.next();
+            Class key = (Class) entry.getKey();
+            PermissionCollection pc = (PermissionCollection) entry.getValue();
+            if (key != pc.elements().nextElement().getClass()) {
+                throw new InvalidObjectException(Messages.getString("security.22")); //$NON-NLS-1$
             }
+            klasses.put(key, pc);
         }
         allEnabled = fields.get("allPermission", null) != null; //$NON-NLS-1$
         if (allEnabled && !klasses.containsKey(AllPermission.class)) {

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common Thu Oct 
7 14:56:06 2010
@@ -1,11 +1,5 @@
-#HARMONY-6524
-org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
-
 #HARMONY-6525
 org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
 
 #HARMONY-6526
 org/apache/harmony/text/tests/java/text/SimpleDateFormatTest.java
-
-#HARMONY-6527
-org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java
(original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/BreakIteratorTest.java
Thu Oct  7 14:56:06 2010
@@ -173,9 +173,10 @@ public class BreakIteratorTest extends T
         assertEquals(TEXT.length() - 1, iterator.previous());
     }
 
-    // public void testGetAvailableLocales() {
-    // Locale[] locales = BreakIterator.getAvailableLocales();
-    // }
+    public void testGetAvailableLocales() {
+        Locale[] locales = BreakIterator.getAvailableLocales();
+        assertTrue(locales.length > 0);
+    }
 
     /*
      * Class under test for BreakIterator getCharacterInstance()

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java
(original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java
Thu Oct  7 14:56:06 2010
@@ -167,7 +167,7 @@ public class CollationElementIteratorTes
 		CollationElementIterator iterator = rbColl
 				.getCollationElementIterator(text);
 		iterator.setOffset(1);
-		assertEquals(1, iterator.getOffset());
+		assertEquals(0, iterator.getOffset());
 	}
 
 	/*
@@ -183,7 +183,7 @@ public class CollationElementIteratorTes
 		assertEquals(1, iterator.getOffset());
 		iterator.setText("cha");
 		iterator.setOffset(1);
-		assertEquals(1, iterator.getOffset());
+		assertEquals(0, iterator.getOffset());
 	}
 
 	/*
@@ -199,6 +199,6 @@ public class CollationElementIteratorTes
 		assertEquals(1, iterator.getOffset());
 		iterator.setText(new StringCharacterIterator("cha"));
 		iterator.setOffset(1);
-		assertEquals(1, iterator.getOffset());
+		assertEquals(0, iterator.getOffset());
 	}
 }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
(original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
Thu Oct  7 14:56:06 2010
@@ -421,7 +421,7 @@ public class DecimalFormatTest extends T
         assertEquals(maxIntDigit, form.getMaximumIntegerDigits());
 
         // regression test for HARMONY-878
-        assertTrue(new DecimalFormat("0\t0").getMaximumIntegerDigits() > 0);
+        assertTrue(new DecimalFormat("0\t'0'").getMaximumIntegerDigits() > 0);
     }
 
     public void test_getMinimumIntegerDigits() {

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/NumberFormatTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/NumberFormatTest.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/NumberFormatTest.java
(original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/NumberFormatTest.java
Thu Oct  7 14:56:06 2010
@@ -84,6 +84,33 @@ public class NumberFormatTest extends ju
                 pos);
         assertEquals("Wrong result BD2: " + out, "51", out.toString());
 
+        try {
+            format.format(this, new StringBuffer(), pos);
+            fail("Should throw IllegalArgumentException");
+        } catch (IllegalArgumentException e) {
+            // Expected
+        }
+
+        try {
+            format.format(null, new StringBuffer(), pos);
+            fail("Should throw IllegalArgumentException");
+        } catch (IllegalArgumentException e) {
+            // Expected
+        }
+
+        try {
+            format.format(new Long(0), null, pos);
+            fail("Should throw NullPointerException");
+        } catch (NullPointerException e) {
+            // Expected
+        }
+
+        try {
+            format.format(new Long(0), new StringBuffer(), null);
+            fail("Should throw NullPointerException");
+        } catch (NullPointerException e) {
+            // Expected
+        }
     }
 
     /**

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
(original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
Thu Oct  7 14:56:06 2010
@@ -130,7 +130,7 @@ public class RuleBasedCollatorTest exten
             String source = "cha";
             CollationElementIterator iterator = coll
                     .getCollationElementIterator(source);
-            int[] e_offset = { 0, 1, 2 ,3};
+            int[] e_offset = { 0, 2 ,3};
             int offset = iterator.getOffset();
             int i = 0;
             assertEquals(e_offset[i++], offset);
@@ -180,7 +180,7 @@ public class RuleBasedCollatorTest exten
             StringCharacterIterator source = new StringCharacterIterator(text);
             CollationElementIterator iterator = coll
                     .getCollationElementIterator(source);
-            int[] e_offset = { 0, 1, 2, 3 };
+            int[] e_offset = { 0, 2, 3 };
             int offset = iterator.getOffset();
             int i = 0;
             assertEquals(e_offset[i++], offset);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/Support_Format.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/Support_Format.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/Support_Format.java
(original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/Support_Format.java
Thu Oct  7 14:56:06 2010
@@ -52,7 +52,7 @@ public class Support_Format extends Test
 
 		assertEquals("Test " + count + ": incorrect begin index for field "
 				+ field, begin, pos.getBeginIndex());
-		assertEquals("Test " + count + ": incorrect end index for field"
+		assertEquals("Test " + count + ": incorrect end index for field "
 				+ field, end, pos.getEndIndex());
 	}
 

Propchange: harmony/enhanced/java/branches/mrh/common_resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct  7 14:56:06 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh/common_resources:935751
-/harmony/enhanced/java/trunk/common_resources:935751-1002080
+/harmony/enhanced/java/trunk/common_resources:935751-1005442
 /harmony/enhanced/trunk/common_resources:476395-921782
 /incubator/harmony/enhanced/trunk/common_resources:292550-476394

Modified: harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties Thu Oct  7
14:56:06 2010
@@ -28,9 +28,9 @@ hamcrest-library.jar=${depends.jars}/ham
 hamcrest-library.jar.url=${maven2.base}/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1.jar
 hamcrest-library.jar.md5=271f78edc4333f0f44df617676e0a874
 
-ecj.jar=${depends.jars}/ecj_3.5.1/ecj-3.5.1.jar
-ecj.jar.url=${eclipse.base}/R-3.5.1-200909170800/ecj-3.5.1.jar
-ecj.jar.md5=3ad7eff5648879a38729d679022925e9
+ecj.jar=${depends.jars}/ecj_3.6.1/ecj-3.6.1.jar
+ecj.jar.url=${eclipse.base}/R-3.6.1-201009090800/ecj-3.6.1.jar
+ecj.jar.md5=448c6e65234fc61624e14b0964d75bd9
 
 # Cpptasks, version 1.0 beta 3 or above
 # http://sourceforge.net/project/showfiles.php?group_id=36177

Modified: harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml Thu Oct  7 14:56:06 2010
@@ -21,9 +21,11 @@
 
 <project name="svn-deps">
     
-    <target name="-svn-info" 
-        description="Sets global SVN properties of the workspace: 
-        is.svn, svn.revision and svn.info">
+    <!--
+        Sets global SVN properties of the workspace: 
+          is.svn, svn.revision and svn.info
+      -->
+    <target name="-svn-info">
         <svn-info dir="${basedir}" prefix="global"/>
         <condition property="is.svn">
             <isset property="global.entry.revision"/>

Propchange: harmony/enhanced/java/branches/mrh/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct  7 14:56:06 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751
-/harmony/enhanced/java/trunk/drlvm:935751-1002080
+/harmony/enhanced/java/trunk/drlvm:935751-1005442
 /harmony/enhanced/trunk/drlvm:476395-926313
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/working_vm:423974-476394

Modified: harmony/enhanced/java/branches/mrh/drlvm/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/make/properties.xml?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/make/properties.xml (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/make/properties.xml Thu Oct  7 14:56:06 2010
@@ -105,7 +105,7 @@
         <echo message="    hy.local.zlib = ${hy.local.zlib}" />
         <echo message=" common resources = ${common.resources}" />
         <echo message="         HDK root = ${hy.hdk}" />
-        <echo message="       target dir = ${drlvm.deploy.dir}" />
+        <echo message="       deploy dir = ${drlvm.deploy.dir}" />
     </target>
 
     <target name="debug-echo">

Modified: harmony/enhanced/java/branches/mrh/jdktools/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/make/depends.properties?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/make/depends.properties (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/make/depends.properties Thu Oct  7 14:56:06
2010
@@ -22,11 +22,11 @@ icu.md5=5b8a0fc0e48431d376c7efd7be8c0f7b
 icu.unzip.path=eclipse/plugins/com.ibm.icu.base_3.6.1.v20070417.jar
 icu.jar=${icu.dir}/com.ibm.icu.base_3.6.1.v20070417.jar
 
-jdt.version=3.5.1
+jdt.version=3.6.1
 jdt.url.base=${harmony.standard.base}/jars/eclipse-JDT-${jdt.version}
 jdt.jdi.jar=${depends.jars}/eclipse-JDT-${jdt.version}/jdi.jar
 jdt.jdi.jar.url=${jdt.url.base}/jdi.jar
-jdt.jdi.jar.md5=b858c597c5dbce17c401426947831efe
+jdt.jdi.jar.md5=70eaf43108c616446221eddc983c7a95
 jdt.jdimodel.jar=${depends.jars}/eclipse-JDT-${jdt.version}/jdimodel.jar
 jdt.jdimodel.jar.url=${jdt.url.base}/jdimodel.jar
-jdt.jdimodel.jar.md5=b2186893f91897e587ad17362169e12b
+jdt.jdimodel.jar.md5=4d89c231b71a09bbadbb176efe3687d2

Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/META-INF/MANIFEST.MF?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/META-INF/MANIFEST.MF (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/META-INF/MANIFEST.MF Thu
Oct  7 14:56:06 2010
@@ -6,7 +6,7 @@ Implementation-Vendor: The Apache Softwa
 Implementation-Vendor-Id: org.apache.harmony
 Implementation-URL: http://harmony.apache.org
 Class-Path: com.ibm.icu.base_3.6.1.v20070417.jar
-  ecj-3.5.1.jar
+  ecj-3.6.1.jar
   jdimodel.jar
   jdtstub.jar
 Bundle-ManifestVersion: 2

Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java
(original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java
Thu Oct  7 14:56:06 2010
@@ -320,9 +320,11 @@ public class Main {
         zos.putNextEntry(zEntry);
         // now write the data
         FileInputStream fis = new FileInputStream(file);
-        byte fileContent[] = new byte[(int)file.length()];
-        fis.read(fileContent);
-        zos.write(fileContent);
+        byte fileContent[] = new byte[1024];
+        int bytesRead;
+        while ((bytesRead = fis.read(fileContent)) != -1) {
+            zos.write(fileContent, 0, bytesRead);
+        }
         zos.closeEntry();
     }    
 }

Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c
(original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c
Thu Oct  7 14:56:06 2010
@@ -128,9 +128,7 @@ int main (int argc, char **argv, char **
     int moreArgvCount = /* -cp <classpath> */ 2 + /* <tool-class> */ 1 + /* NULL
*/ 1;
     char **myArgv = (char **) malloc(sizeof(char*) * (myArgvCount + moreArgvCount));    
     char *toolName = NULL;
-    char *cmd_line = NULL;
-    int size, i, j;
-    int cmd_len = 0;
+    int i;
     int exit_code = -1;
     int newIndex = 0;
     char *root = NULL;
@@ -211,6 +209,7 @@ int main (int argc, char **argv, char **
     if (strcmp(toolName, "java") && !isJavaw) {
         char *classpath;
         char *buffer;
+        int size;
 
         myArgvCount = argc + moreArgvCount;
         
@@ -281,69 +280,75 @@ int main (int argc, char **argv, char **
      
 #if defined(WIN32)
 
-    /*
-     * win32 - CreateProcess() needs a cmd line string
-     *   - double quote all arguments to avoid breaking spaces
-     *   - prepend existing double quotes with '\'
-     */
+    {
+        char *cmd_line = NULL;
+        int cmd_len = 0;
+        int j;
+        int size = 0;
+
+        /*
+         * win32 - CreateProcess() needs a cmd line string
+         *   - double quote all arguments to avoid breaking spaces
+         *   - prepend existing double quotes with '\'
+         */
      
-    // determine required memory size for command line arguments
-    size = 0;
-    for (i=1; i < myArgvCount; i++) {
-        if (myArgv[i] != NULL) {
-            int arg_len = strlen(myArgv[i]);
-            size += /* space */ 1 + /* quotes */ 2 + arg_len;
-            for (j = 0; j < arg_len; j++) {
-                 if (myArgv[i][j] == '\"') size++;
+        // determine required memory size for command line arguments
+        for (i=1; i < myArgvCount; i++) {
+            if (myArgv[i] != NULL) {
+                int arg_len = strlen(myArgv[i]);
+                size += /* space */ 1 + /* quotes */ 2 + arg_len;
+                for (j = 0; j < arg_len; j++) {
+                    if (myArgv[i][j] == '\"') size++;
+                }
             }
         }
-    }
     
-    // allocate memory for whole command line
-    cmd_line = (char *) malloc(strlen(fullExePath) + /* quotes */ 2 + /* arguments */ size
+ /* NULL */ 1);
+        // allocate memory for whole command line
+        cmd_line = (char *) malloc(strlen(fullExePath) + /* quotes */ 2 + /* arguments */
size + /* NULL */ 1);
     
-    if (cmd_line == NULL) { 
-        fprintf(stderr, "Unable to allocate memory for tool command line %s\n", argv[0]);
-        return 4;
-    }
+        if (cmd_line == NULL) { 
+            fprintf(stderr, "Unable to allocate memory for tool command line %s\n", argv[0]);
+            return 4;
+        }
     
-    // copy quoted exe path
-    sprintf(cmd_line, "\"%s\"", fullExePath);
-    cmd_len = strlen(cmd_line);
+        // copy quoted exe path
+        sprintf(cmd_line, "\"%s\"", fullExePath);
+        cmd_len = strlen(cmd_line);
         
-    // copy quoted arguments and prepend existing double quotes with '\'
-    for (i=1; i < myArgvCount; i++) {
-        if (myArgv[i] != NULL) {
-            int arg_len = strlen(myArgv[i]);
-            cmd_line[cmd_len++] = ' ';  // space delimiter
-            cmd_line[cmd_len++] = '\"'; // starting quote
-            for (j = 0; j < arg_len; j++) {
-                char ch = myArgv[i][j];
-                if (ch == '\"') {
-                    cmd_line[cmd_len++] = '\\';
-                }  
-                cmd_line[cmd_len++] = ch;
+        // copy quoted arguments and prepend existing double quotes with '\'
+        for (i=1; i < myArgvCount; i++) {
+            if (myArgv[i] != NULL) {
+                int arg_len = strlen(myArgv[i]);
+                cmd_line[cmd_len++] = ' ';  // space delimiter
+                cmd_line[cmd_len++] = '\"'; // starting quote
+                for (j = 0; j < arg_len; j++) {
+                    char ch = myArgv[i][j];
+                    if (ch == '\"') {
+                        cmd_line[cmd_len++] = '\\';
+                    }
+                    cmd_line[cmd_len++] = ch;
+                }
+                cmd_line[cmd_len++] = '\"'; // ending quote
             }
-            cmd_line[cmd_len++] = '\"'; // ending quote
         }
-    }
-    cmd_line[cmd_len] = '\0';
+        cmd_line[cmd_len] = '\0';
     
-    // create child process
-    memset(&procInfo, 0, sizeof(PROCESS_INFORMATION));
-    memset(&startInfo, 0, sizeof(STARTUPINFO));
-    startInfo.cb = sizeof(STARTUPINFO);
+        // create child process
+        memset(&procInfo, 0, sizeof(PROCESS_INFORMATION));
+        memset(&startInfo, 0, sizeof(STARTUPINFO));
+        startInfo.cb = sizeof(STARTUPINFO);
         
-    if (!CreateProcess(NULL, cmd_line, NULL, NULL,
-                    TRUE, 0, NULL, NULL, &startInfo, &procInfo)) { 
+        if (!CreateProcess(NULL, cmd_line, NULL, NULL,
+                           TRUE, 0, NULL, NULL, &startInfo, &procInfo)) { 
+
+            fprintf(stderr, "Error creating process : %d\n", GetLastError());
+            free(cmd_line);
+            return exit_code;
+        }
 
-        fprintf(stderr, "Error creating process : %d\n", GetLastError());
         free(cmd_line);
-        return exit_code;
     }
 
-    free(cmd_line);
-
     // wait for child process to finish
     if (!isJavaw && WAIT_FAILED == WaitForSingleObject(procInfo.hProcess, INFINITE))
{
 
@@ -541,7 +546,6 @@ TOOLDATA *getToolData(const char *toolNa
     FILE *fp = NULL;
     char key[256];
     char value[256];
-    int count = 0;
     char *temp = NULL;
     TOOLDATA *pToolData = NULL;
             
@@ -587,6 +591,7 @@ TOOLDATA *getToolData(const char *toolNa
     free(temp);
  
     if (fp) {
+        int count = 0;
         while (EOF != (count = fscanf(fp, "%s = %s\n", key, value))) {
             // printf("count = %d : %s = %s\n", count, key, value);
             

Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/resources/data/javac.dat
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/resources/data/javac.dat?rev=1005476&r1=1005475&r2=1005476&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/resources/data/javac.dat
(original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/resources/data/javac.dat
Thu Oct  7 14:56:06 2010
@@ -1,3 +1,3 @@
-JDKToolJar = ecj-3.5.1.jar
+JDKToolJar = ecj-3.6.1.jar
 JDKToolJar = tools.jar
 



Mime
View raw message