Issue Details (XML | Word | Printable)

Key: XBEAN-92
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Shawn Jiang
Reporter: karan singh malhi
Votes: 0
Watchers: 1
Available Workflow Actions

Reopen Issue
Operations

If you were logged in you would be able to see more operations.
XBean

UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

Created: 06/Sep/07 03:02 PM   Updated: 10/Sep/09 09:39 PM
Return to search
Component/s: finder
Affects Version/s: None
Fix Version/s: 3.6

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works XBEAN-92.patch.txt 2009-09-04 08:05 PM Andreas Veithen 1 kB
Environment: IBM JDK 5

Resolution Date: 10/Sep/09 09:39 PM


 Description  « Hide
With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null. This is a critical issue as it prevents OpenEjb from starting

In UrlSet, the following method will lead to a NullPointerException:

public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException { return excludePaths(System.getProperty("java.endorsed.dirs")); }
This is because the excludePaths() method assumes that the pathString argument is always non-null.
public UrlSet excludePaths(String pathString) throws MalformedURLException {
String[] paths = pathString.split(File.pathSeparator);
UrlSet urlSet = this;
for (String path : paths) { File file = new File(path); urlSet = urlSet.exclude(file); }
return urlSet;
}



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #573361 Thu Sep 06 20:36:36 UTC 2007 dblevins Compensate for when java.endorsed.dirs is null. Fixes XBEAN-92.
Files Changed
MODIFY /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java

Repository Revision Date User Message
ASF #813275 Thu Sep 10 07:29:09 UTC 2009 dblevins Patch from Andreas Veithen, for XBEAN-92: UrlSet excludePaths() method throws a nullpointer
which is IBM JDK specific.
Thanks, Andreas!
Files Changed
MODIFY /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java