geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsis...@apache.org
Subject svn commit: r397786 - /geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java
Date Fri, 28 Apr 2006 06:56:32 GMT
Author: jsisson
Date: Thu Apr 27 23:56:31 2006
New Revision: 397786

URL: http://svn.apache.org/viewcvs?rev=397786&view=rev
Log:
Remove the call to artifact.isResolved() in the contains(Artifact artifact) method,  as it
the isResolved test is done as the first thing in the call to  getLocation(artifact) in the
next statement.

Modified:
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java?rev=397786&r1=397785&r2=397786&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java
(original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java
Thu Apr 27 23:56:31 2006
@@ -98,9 +98,7 @@
     }
 
     public boolean contains(Artifact artifact) {
-        if(!artifact.isResolved()) {
-            throw new IllegalArgumentException("Artifact "+artifact+" is not fully resolved");
-        }
+        // Note: getLocation(artifact) does an artifact.isResolved() check - no need to do
it here.
         File location = getLocation(artifact);
         return location.canRead() && (location.isFile() || new File(location, "META-INF").isDirectory());
     }



Mime
View raw message