This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | IllegalArgumentException: file:/home/aldo/.m2/repository/org/apache/derby/derby/10.10.1.1/derby-10.10.1.1-sources.jar is not a valid classpath entry; use a jar-protocol URL. | ||
---|---|---|---|
Product: | debugger | Reporter: | aldobrucale <aldobrucale> |
Component: | Java | Assignee: | Martin Entlicher <mentlicher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hildo, lostmats |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 203695 |
Attachments: | stacktrace |
Description
aldobrucale
2013-09-09 11:14:43 UTC
Created attachment 139823 [details]
stacktrace
It's ClassPathSupport.createClassPath(FileObject... roots), which creates the URL. If jar-protocol URL should be there, test the root for being a JAR. >It's ClassPathSupport.createClassPath(FileObject... roots), which creates the >URL. If jar-protocol URL should be there, test the root for being a JAR.
Not true.
The ClassPathSupport.createClassPath(FileObject... roots) just converts the given FOs to URLs, it does neither magic nor garbage in garbage out anti pattern. It just converts the given arguments into URLs and delegates it to ClassPathSupport.createClassPath(URL...) which verifies pre conditions.
The called (debugger) is responsible for passing correct FileObjects (root of archives or folders).
For example the src.zip is an example of ambiguity where conversion of src.zip into src.zip!/ does not work as the archive has relocation. Debugger correctly asks FileUtil.isArchiveFile(), but this test had to return false for these JARs. Despite this a different test for JAR files in SimplePathResourceImplementation fails. This suggests, that the error occurs for empty or broken JARs. Fixed by changeset: 264461:538f613a8a9d http://hg.netbeans.org/core-main/rev/538f613a8a9d |