db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r366230 - /db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
Date Thu, 05 Jan 2006 17:57:18 GMT
Author: djd
Date: Thu Jan  5 09:57:16 2006
New Revision: 366230

URL: http://svn.apache.org/viewcvs?rev=366230&view=rev
Log:
DERBY-798 Fix NullPointerException when Derby is loaded by the bootstrap
class loader in a jvm which returns null on Class.getClassLoader().
Fix suggested by Timothy Luksha (RIT Student)
Merge of 366226 from trunk.

Modified:
    db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java?rev=366230&r1=366229&r2=366230&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
(original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
Thu Jan  5 09:57:16 2006
@@ -1273,8 +1273,10 @@
 
         ClassLoader cl = getClass().getClassLoader();
         try {
-            for( Enumeration e = cl.getResources("org/apache/derby/modules.properties");
-                 e.hasMoreElements() ;) {
+        	Enumeration e = cl == null ?
+        		ClassLoader.getSystemResources("org/apache/derby/modules.properties") :
+        		cl.getResources("org/apache/derby/modules.properties");
+            while (e.hasMoreElements()) {
                 URL modulesPropertiesURL = (URL) e.nextElement();
                 InputStream is = null;
                 try {



Mime
View raw message