Issue Details (XML | Word | Printable)

Key: TRIDENT-13
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: andrepdo
Votes: 0
Watchers: 0
Operations

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

TridentConfig.java should not use Thread.currentThread().getContextClassLoader() its not granted that this classloader is set

Created: 18/Oct/11 09:05 AM   Updated: 18/Oct/11 09:05 AM
Component/s: core
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

X11, Windows, Mac OS X


Tags: Thread currentThread getContextClassLoader


 Description  « Hide

TridentConfig.java should not use Thread.currentThread().getContextClassLoader() its not granted that this classloader is set in all environments.

i think, getClass().getClassLoader().getResources() should be used instead.

----------
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Enumeration urls = classLoader.getResources("META-INF/filename.properties");
while (urls.hasMoreElements()) { URL pluginUrl = (URL) urls.nextElement(); ... }
---------

for reference see: http://www.javaworld.com/javaworld/javaqa/2003-06/01-qa-0606-load.html

regards,
andre



There are no comments yet on this issue.