Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 54541 invoked from network); 12 Jun 2008 07:04:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2008 07:04:36 -0000 Received: (qmail 56329 invoked by uid 500); 12 Jun 2008 07:04:39 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 56299 invoked by uid 500); 12 Jun 2008 07:04:39 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 56290 invoked by uid 99); 12 Jun 2008 07:04:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 00:04:39 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 07:03:58 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1B30A234C138 for ; Thu, 12 Jun 2008 00:03:46 -0700 (PDT) Message-ID: <544587986.1213254226109.JavaMail.jira@brutus> Date: Thu, 12 Jun 2008 00:03:46 -0700 (PDT) From: "Erik-Berndt Scheper (JIRA)" To: notifications@ant.apache.org Subject: [jira] Commented: (IVY-831) NPE in AbstractResolver.exists() if a resource cannot be found In-Reply-To: <596901554.1213093484925.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IVY-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604429#action_12604429 ] Erik-Berndt Scheper commented on IVY-831: ----------------------------------------- Notwithstanding my previous comment: this issue is fully resolved.. > NPE in AbstractResolver.exists() if a resource cannot be found > -------------------------------------------------------------- > > Key: IVY-831 > URL: https://issues.apache.org/jira/browse/IVY-831 > Project: Ivy > Issue Type: Bug > Components: Core > Affects Versions: 2.0-RC1 > Reporter: Erik-Berndt Scheper > Assignee: Xavier Hanin > Fix For: 2.0-RC1 > > > 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: > {noformat} > 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) > {noformat} > Offending code: > {noformat} > /** > * 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; > } > {noformat} > If the DownloadReport instance is null, a NPE occurs -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.