Bug 297042 - DriverWrapper used for testing throws NPE after driverName has been set to null
Summary: DriverWrapper used for testing throws NPE after driverName has been set to null
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-12-07 03:40 EST by Adrian Goerler CLA
Modified: 2022-06-09 10:20 EDT (History)
2 users (show)

See Also:


Attachments
Patch: non-initialized DriverWrapper should be ignored by DriverManager. (1.56 KB, patch)
2009-12-07 17:20 EST, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Goerler CLA 2009-12-07 03:40:25 EST
The class org.eclipse.persistence.testing.framework.DriverWrapper has a clear method which sets the driverName member to null. However, the DriverWrapper remains registerd by the java.sql.DriverManager. If it is atempted to connect to the DriverWrapper, it throws an NPE.

The accepts method of the DriverWrapper should return false if driverName is null and/or the connect method should return null.
Comment 1 Andrei Ilitchev CLA 2009-12-07 17:20:19 EST
Created attachment 153970 [details]
Patch: non-initialized DriverWrapper should be ignored by DriverManager.
Comment 2 Andrei Ilitchev CLA 2009-12-07 17:22:06 EST
Fixed in trunk (2.0.1)
Comment 3 Andrei Ilitchev CLA 2010-01-06 15:02:49 EST
Ported to 2.0.1.
The bug is fixed in both trunk (2.1) and 2.0.1.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:20:04 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink