summaryrefslogtreecommitdiff
path: root/java/sql
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-05-31 16:19:46 +0000
committerTom Tromey <tromey@redhat.com>2001-05-31 16:19:46 +0000
commit4548a0d46eb6ddc103afa70c040220f74cd14bad (patch)
tree2fbdbe164caa92303fba5627a47f16b4ecb8b972 /java/sql
parentac4164494e9baf392899cccddc6deb386726f614 (diff)
downloadclasspath-4548a0d46eb6ddc103afa70c040220f74cd14bad.tar.gz
* java/sql/DriverManager.java (getDrivers): Handle case where
driver's class loader is null. From Corey Minyard.
Diffstat (limited to 'java/sql')
-rw-r--r--java/sql/DriverManager.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/java/sql/DriverManager.java b/java/sql/DriverManager.java
index 641bfe479..696facaff 100644
--- a/java/sql/DriverManager.java
+++ b/java/sql/DriverManager.java
@@ -1,5 +1,5 @@
/* DriverManager.java -- Manage JDBC drivers
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -264,8 +264,13 @@ getDrivers()
while(e.hasMoreElements())
{
Object obj = e.nextElement();
- if (!obj.getClass().getClassLoader().equals(cl))
- continue;
+
+ ClassLoader loader = obj.getClass().getClassLoader();
+
+ if (loader == null)
+ loader = ClassLoader.getSystemClassLoader();
+ if (!loader.equals(cl))
+ continue;
v.addElement(obj);
}