Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351374

Summary: "user" property in DatasourceLogin not removed when calling setUsername(null)
Product: z_Archived Reporter: David Minsky <david.minsky>
Component: EclipselinkAssignee: David Minsky <david.minsky>
Status: RESOLVED FIXED QA Contact: Project Inbox <eclipselink.foundation-inbox>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed patch and testcase none

Description David Minsky CLA 2011-07-06 17:25:47 EDT
DatasourceLogin is initialized with a default "user" property and an empty ("") username. Some drivers don't like the "user" and "password" properties, and therefore these should be easily removable from the DatasourceLogin's internal properties (passed at runtime to the driver/DS).

Problem:

1. Calling DatasourceLogin >> setUserName(null) does not remove the "user" property from the internal properties, and therefore the property is still passed at runtime. Inconveniently the following workaround must be used instead:

   DataSourceLogin.getProperties().remove("user");

2. Calling DatasourceLogin >> setPassword(null) removes the "password" property from the internal properties, so there is an element of inconsistency to the way that this works currently.

Proposing that calling DatasourceLogin >> setUserName(null) remove the "user" property from the DatasourceLogin's internal properties list.
Comment 1 David Minsky CLA 2011-07-06 17:56:38 EDT
6117441
Comment 2 David Minsky CLA 2011-07-06 17:57:01 EDT
Created attachment 199215 [details]
Proposed patch and testcase
Comment 3 David Minsky CLA 2011-07-14 18:28:56 EDT
Fixed in trunk (2.4) at revision: 9733
2.3.1 checkin pending
Comment 4 David Minsky CLA 2011-07-15 17:20:40 EDT
Checked into 2.3.1 at r9746
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:06:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink