You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by js...@apache.org on 2006/04/28 08:56:32 UTC

svn commit: r397786 - /geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java

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());
     }