db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: rev 55852 - incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor
Date Thu, 28 Oct 2004 13:56:44 GMT
Author: djd
Date: Thu Oct 28 06:56:42 2004
New Revision: 55852

Modified:
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
Log:
Derby may fail to start when it is loaded through a custom ClassLoader.
The reason is that the static java.lang.ClassLoader.getSystemResources method may not
find the resources loaded by a custom ClassLoader.
The patch fixes that by getting the current ClassLoader and calling its getResources method.

Patch from Jack Klebanoff <klebanof@Mutagen.Net>



Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
Thu Oct 28 06:56:42 2004
@@ -1247,9 +1247,10 @@
 
 		Properties moduleList = new Properties();
         boolean firstList = true;
+        ClassLoader cl = getClass().getClassLoader();
 
         try {
-            for( Enumeration e = ClassLoader.getSystemResources( "org/apache/derby/modules.properties");
+            for( Enumeration e = cl.getResources( "org/apache/derby/modules.properties");
                  e.hasMoreElements() ;) {
                 URL modulesPropertiesURL = (URL) e.nextElement();
                 InputStream is = null;

Mime
View raw message