You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by fu...@apache.org on 2006/08/02 02:20:39 UTC

svn commit: r427816 - /db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java

Author: fuzzylogic
Date: Tue Aug  1 17:20:38 2006
New Revision: 427816

URL: http://svn.apache.org/viewvc?rev=427816&view=rev
Log:
DERBY-1537: Don't put metadata.properties into derbytools.jar. Avoids boot-time
exception when running tests with derbytools.jar in front of derby.jar in the 
classpath. 

Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java?rev=427816&r1=427815&r2=427816&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java Tue Aug  1 17:20:38 2006
@@ -623,9 +623,16 @@
 		if (!isCloudscapeCode(className))
 			return;
 
-		String packageName = className.substring(0, className.lastIndexOf('.') + 1);
+                // The following block of code checks the package of each class
+                // scanned to see if there is a corresponding properties file
+                // from propFiles and adds it to the list of found classes.
+                // derbytools.jar should not contain any of these files, so skip
+                // for that jar. See also DERBY-1537.
+                if (!db2jtools)
+                {
+		    String packageName = className.substring(0, className.lastIndexOf('.') + 1);
 
-		for (int i = 0; i < propFiles.length; i++) {
+		    for (int i = 0; i < propFiles.length; i++) {
 			String fileName = "/" + packageName.replace('.', '/') + propFiles[i];
 			if (foundClasses.get(fileName) != null)
 				continue;
@@ -637,8 +644,9 @@
 
 
 			foundClasses.put(fileName.substring(1), "file");
-		}
-} finally {
+		    }
+                }
+        } finally {
 		indent--;
 	}
 	}