vancetang / 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

reflections fails to see classes outside of current jar, and the current classpath helper doesn't filter out invalid URL entries #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the current version of reflections (0.9.5), the classpath helper doesn't
look at manifests for additional JARs that could be searched for instances
of the target class.

Also the current classpath helper doesn't filter invalid records (one's
that don't have a corresponding URL type in the vfs classes).  

I've attached a patch that I used to work around the issue (it could use a
little clean-up, but it works).   

What steps will reproduce the problem?
1. For the manifest issue, use reflections looking for classes in dependent
jars.
2. For the filtering URL problem, the most reliable way to reproduce it is
to run it on Mac OS X (which by default adds a zip to the classpath on each
machine I tested).

What is the expected output? What do you see instead?
No classes are found in the manifest case, and the system will exception
out in the filtered URL situation.

What version of the product are you using? On what operating system?
0.9.5 RC1 on both OS X 10.5 and 10.6, and various linux distros.

Please provide any additional information below.

Thanks for the great library! It's really appreciated, and let me know if I
can do anything to recraft the patch.  

Original issue reported on code.google.com by aaronat...@gmail.com on 11 May 2010 at 9:14

Attachments:

GoogleCodeExporter commented 9 years ago
thanks for the patch, it is now merged into ClasspathHelper (with some changes) 
and 
commited on trunk. 

Original comment by ronm...@gmail.com on 14 May 2010 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by ronm...@gmail.com on 17 May 2010 at 4:21