ridencww / goldengine

Java implementation of Devin Cook's GOLD Parser engine
Other
35 stars 14 forks source link

jar: prefix stripped away by resouce.getFile() #15

Closed kevinzbaker closed 8 months ago

kevinzbaker commented 9 years ago

com.creativewidgetworks.goldparser.util.ResourceHelper In method findClassesInPackage(String packageName) resouce.getFile() strips away the "jar:" prefix. The method getJarFile(String filePath) cannot find "jar:file:/" so it is not recognizing jar files.

In getJarFile( String filePath) replacing: filePath = filePath.substring((filePath.indexOf("jar:file:/") + 9), filePath.indexOf('!')); with: filePath = filePath.substring( filePath.indexOf("/"), filePath.indexOf('!')); Fixed it for me. Thanks, Kevin

ridencww commented 9 years ago

Thanks, Kevin. I am reviewing your change and writing unit tests for incorporation into the master.