Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 61769 invoked from network); 15 May 2008 22:46:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2008 22:46:12 -0000 Received: (qmail 22597 invoked by uid 500); 15 May 2008 22:46:14 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 22560 invoked by uid 500); 15 May 2008 22:46:14 -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 22549 invoked by uid 99); 15 May 2008 22:46:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 15:46:13 -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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 22:45:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 67946238896F; Thu, 15 May 2008 15:45:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r656885 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer: IvyClasspathContainer.java IvyResolveJob.java Date: Thu, 15 May 2008 22:45:51 -0000 To: notifications@ant.apache.org From: hibou@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080515224551.67946238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hibou Date: Thu May 15 15:45:50 2008 New Revision: 656885 URL: http://svn.apache.org/viewvc?rev=656885&view=rev Log: IVYDE-91: NPE when setting a bad file for the ivy setting path in the global configuration panel - handle no ivy while starting a resolve job Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java?rev=656885&r1=656884&r2=656885&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java Thu May 15 15:45:50 2008 @@ -182,7 +182,11 @@ // resolve job already running return job; } - job = new IvyResolveJob(this, usePreviousResolveIfExist, notify, conf); + Ivy ivy = IvyPlugin.getIvy(conf.getInheritedIvySettingsPath()); + if (ivy == null) { + return null; + } + job = new IvyResolveJob(this, usePreviousResolveIfExist, notify, conf, ivy); job.setUser(isUser); job.setRule(RESOLVE_EVENT_RULE); return job; Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java?rev=656885&r1=656884&r2=656885&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java Thu May 15 15:45:50 2008 @@ -88,24 +88,24 @@ private boolean _notify; - private Ivy ivy; + private final Ivy ivy; private final IvyClasspathContainerConfiguration conf; private final IvyClasspathContainer container; public IvyResolveJob(IvyClasspathContainer container, boolean usePreviousResolveIfExist, - boolean notify, IvyClasspathContainerConfiguration conf) throws FileNotFoundException, + boolean notify, IvyClasspathContainerConfiguration conf, Ivy ivy) throws FileNotFoundException, ParseException, IOException { super("Resolve " + (conf.getJavaProject() == null ? "" : conf.getJavaProject().getProject() .getName() + "/") + conf.ivyXmlPath + " dependencies"); this.container = container; + this.ivy = ivy; _usePreviousResolveIfExist = usePreviousResolveIfExist; _notify = notify; this.conf = conf; - ivy = IvyPlugin.getIvy(conf.getInheritedIvySettingsPath()); } public void transferProgress(TransferEvent evt) {