ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r726842 - in /ant/ivy/core/branches/2.0.x: ./ src/java/org/apache/ivy/plugins/resolver/ test/java/org/apache/ivy/core/resolve/ test/repositories/norev/ test/repositories/norev/module3/
Date Mon, 15 Dec 2008 22:12:55 GMT
Author: maartenc
Date: Mon Dec 15 14:12:54 2008
New Revision: 726842

URL: http://svn.apache.org/viewvc?rev=726842&view=rev
Log:
FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980) (merged
from trunk)

Added:
    ant/ivy/core/branches/2.0.x/test/repositories/norev/ivy-latest.xml
      - copied unchanged from r723065, ant/ivy/core/trunk/test/repositories/norev/ivy-latest.xml
    ant/ivy/core/branches/2.0.x/test/repositories/norev/module3/
      - copied from r723065, ant/ivy/core/trunk/test/repositories/norev/module3/
    ant/ivy/core/branches/2.0.x/test/repositories/norev/module3/module3.jar
      - copied unchanged from r723065, ant/ivy/core/trunk/test/repositories/norev/module3/module3.jar
Modified:
    ant/ivy/core/branches/2.0.x/   (props changed)
    ant/ivy/core/branches/2.0.x/CHANGES.txt
    ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
    ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java

Propchange: ant/ivy/core/branches/2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 15 14:12:54 2008
@@ -1,2 +1,2 @@
 /ant/ivy/core/branches/2.0.0-rc2:707177-709027
-/ant/ivy/core/trunk:695737,696014-696031,696442,698318-706770,709027-709034,709039-710178,720308-720591
+/ant/ivy/core/trunk:695737,696014-696031,696442,698318-706770,709027-709034,709039-710178,720308-720591,721305-723065

Modified: ant/ivy/core/branches/2.0.x/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/CHANGES.txt?rev=726842&r1=726841&r2=726842&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.x/CHANGES.txt (original)
+++ ant/ivy/core/branches/2.0.x/CHANGES.txt Mon Dec 15 14:12:54 2008
@@ -87,6 +87,7 @@
 
 - FIX: Log levels aren't respected in certain cases using the standalone functionality (IVY-960)
(thanks to Patrick Woodworth)
 - FIX: NPE in LogReportOutputter (IVY-961)
+- FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980)
 
    2.0.0-rc2
 =====================================

Modified: ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java?rev=726842&r1=726841&r2=726842&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
(original)
+++ ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
Mon Dec 15 14:12:54 2008
@@ -454,6 +454,8 @@
             if (!isDynamic) {
                 resolvedMrid = ModuleRevisionId.newInstance(
                     resolvedMrid, dependencyConstraint.getRevision());
+            } else if (ivyRef == null) {
+                resolvedMrid = systemMd.getMetadataArtifact().getModuleRevisionId();
             } else if (ivyRef.getRevision() == null || ivyRef.getRevision().length() == 0)
{
                 resolvedMrid = ModuleRevisionId.newInstance(resolvedMrid, "working@"
                     + getName());

Modified: ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=726842&r1=726841&r2=726842&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original)
+++ ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java Mon
Dec 15 14:12:54 2008
@@ -267,6 +267,15 @@
         assertFalse(report.hasError());
     }
 
+    public void testResolveLatestWithNoRevisionInPattern() throws Exception {
+        Ivy ivy = new Ivy();
+        ivy.configure(new File("test/repositories/norev/ivysettings.xml").toURL());
+        ResolveReport report = ivy.resolve(new File("test/repositories/norev/ivy-latest.xml").toURL(),
+            getResolveOptions(new String[] {"*"}));
+        assertNotNull(report);
+        assertFalse(report.hasError());
+     }
+
     public void testResolveNoRevisionInDep() throws Exception {
         // mod1.4 depends on mod1.6, in which the ivy file has no revision
         ResolveReport report = ivy.resolve(new File(



Mime
View raw message