diff options
author | Tom Tromey <tromey@redhat.com> | 2001-05-31 16:19:46 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2001-05-31 16:19:46 +0000 |
commit | 4548a0d46eb6ddc103afa70c040220f74cd14bad (patch) | |
tree | 2fbdbe164caa92303fba5627a47f16b4ecb8b972 /java/sql | |
parent | ac4164494e9baf392899cccddc6deb386726f614 (diff) | |
download | classpath-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.java | 11 |
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); } |