harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r689415 - in /harmony/enhanced/classlib/trunk/modules/pack200/src: main/java/org/apache/harmony/unpack200/Segment.java test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
Date Wed, 27 Aug 2008 08:42:04 GMT
Author: sjanuary
Date: Wed Aug 27 01:42:04 2008
New Revision: 689415

URL: http://svn.apache.org/viewvc?rev=689415&view=rev
Log:
Pack200 - some code cleanup

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java?rev=689415&r1=689414&r2=689415&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
Wed Aug 27 01:42:04 2008
@@ -333,11 +333,11 @@
 
     	// need to compute:
     	//   result = ic_local XOR ic_relevant
-    	
+
     	// add ic_local
     	if (ic_local != null) {
     		for(int index = 0; index < ic_local.length; index++) {
-    			if (isInResult.add(ic_local[index])) { 
+    			if (isInResult.add(ic_local[index])) {
     				result.add(ic_local[index]);
     			}
     		}
@@ -345,7 +345,7 @@
 
     	// add ic_relevant
 		for(int index = 0; index < ic_relevant.length; index++) {
-			if (isInResult.add(ic_relevant[index])) { 
+			if (isInResult.add(ic_relevant[index])) {
 				result.add(ic_relevant[index]);
 			} else {
 				duplicates.add(ic_relevant[index]);
@@ -357,7 +357,7 @@
 			IcTuple tuple = (IcTuple)duplicates.get(index);
 			result.remove(tuple);
 		}
-		
+
         return result;
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java?rev=689415&r1=689414&r2=689415&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
Wed Aug 27 01:42:04 2008
@@ -114,53 +114,6 @@
         }
         reader1.close();
         reader2.close();
-
-//        try {
-//            Process process = Runtime
-//                    .getRuntime()
-//                    .exec(
-//                            "java -cp "
-//                                    + file.getName()
-//                                    + " org.apache.harmony.archive.tests.internal.pack200.HelloWorld",
-//                            new String[] {}, file.getParentFile());
-//            BufferedReader reader = new BufferedReader(new InputStreamReader(
-//                    process.getInputStream()));
-//            String line = reader.readLine();
-//            assertEquals("Hello world", line);
-//            reader.close();
-//
-//            Process process2 = Runtime
-//                    .getRuntime()
-//                    .exec(
-//                            "javap -c -verbose -classpath "
-//                                    + file.getName()
-//                                    + " org.apache.harmony.archive.tests.internal.pack200.HelloWorld",
-//                            new String[] {}, file.getParentFile());
-//            BufferedReader reader1 = new BufferedReader(new InputStreamReader(process2
-//                    .getInputStream()));
-//            InputStream javapCompareFile = Segment.class
-//                    .getResourceAsStream("/org/apache/harmony/pack200/tests/HelloWorldJavap.out");
-//            BufferedReader reader2 = new BufferedReader(new InputStreamReader(
-//                    javapCompareFile));
-//            String line1 = readNextLine(reader1);
-//            String line2 = readNextLine(reader2);
-//            int i = 1;
-//            while (line1 != null || line2 != null) {
-//                assertEquals(line2, line1);
-//                line1 = readNextLine(reader1);
-//                line2 = readNextLine(reader2);
-//                i++;
-//            }
-//            reader1.close();
-//            reader2.close();
-//        } catch (IOException e) {
-//            String message = e.getMessage();
-//            if (message.startsWith("Unable to start program") || message.startsWith("The
creation of the Process has just failed")) {
-//                System.out.println("Warning: org.apache.harmony.unpack200.tests.SegmentTest.testHelloWorld()
was not completed as java or javap could not be found");
-//            } else {
-//                throw e;
-//            }
-//        }
     }
 
     private String readNextLine(BufferedReader reader) throws IOException {



Mime
View raw message