Description
A NullPointerException occurs inAbstractResolver.exists(AbstractResolver.java:196) if a host cannot be found
Reproducible with "ant coverage-report" behind a firewall with proxy install disabled.
Resulting stack trace:
java.lang.NullPointerException at org.apache.ivy.plugins.resolver.AbstractResolver.exists(AbstractResolver.java:196) at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.addSourcesAndJavadocArtifactsIfPresent(PomModuleDescriptorParser.java:267) at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:246) at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:104) at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParserTest.testSimple(PomModuleDescriptorParserTest.java:89)
Offending code:
/** * Default implementation actually download the artifact Subclasses should overwrite this to * avoid the download */ public boolean exists(Artifact artifact) { DownloadReport dr = download(new Artifact[] {artifact}, new DownloadOptions()); ArtifactDownloadReport adr = dr.getArtifactReport(artifact); return adr.getDownloadStatus() != DownloadStatus.FAILED; }
If the DownloadReport instance is null, a NPE occurs
Attachments
Issue Links
- relates to
-
IVY-832 Ivy build system: fix build.xml to allow "ant coverage-report" behind a proxy
- Resolved