Commit 5980a00a by Tom Tromey Committed by Tom Tromey

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
parent bfa1e6b1
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.
......
/* 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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment