DriverManager.java (getDrivers): Handle case where driver's class loader is null.
* java/sql/DriverManager.java (getDrivers): Handle case where driver's class loader is null. From Corey Minyard. From-SVN: r42745
This commit is contained in:
parent
bfa1e6b11b
commit
5980a00aeb
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-05-31 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/sql/DriverManager.java (getDrivers): Handle case where
|
||||
driver's class loader is null. From Corey Minyard.
|
||||
|
||||
2001-05-29 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* include/jvm.h (_Jv_ThrowNoMemory): Mark as noreturn.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue