rachavz / reflections

Automatically exported from code.google.com/p/reflections
Do What The F*ck You Want To Public License
0 stars 0 forks source link

ClasspathHelper.forPackage throws null pointer on line 54 #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. set Thread.currentThread().setContextClassLoader(null)
2. call forPackage with a resource and an empty list of ClassLoaders, this will 
cause forPackage to use the default classloaders
3. null pointer on line 54

What is the expected output? What do you see instead?
the problem is that in some cases the 
Thread.currentThread().getContextClassLoader() can return null and forPackage 
does not check for that and this causes an NPE

What version of the product are you using? On what operating system?
version 0.95, linux

Please provide any additional information below.

Original issue reported on code.google.com by jmleg...@gmail.com on 7 Nov 2012 at 12:01

GoogleCodeExporter commented 9 years ago
fixed on trunk, comments are welcomed

Original comment by ronm...@gmail.com on 20 Feb 2013 at 9:04