ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r1226320 - /ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoader.java
Date Mon, 02 Jan 2012 00:04:43 GMT
Author: maartenc
Date: Mon Jan  2 00:04:42 2012
New Revision: 1226320

URL: http://svn.apache.org/viewvc?rev=1226320&view=rev
Log:
populateP2Descriptor returns true if artifactsExists or contentExists is true (instead of
only considering artifactsExists)

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoader.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoader.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoader.java?rev=1226320&r1=1226319&r2=1226320&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoader.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoader.java Mon Jan
 2 00:04:42 2012
@@ -107,22 +107,18 @@ public class UpdateSiteLoader {
             throws IOException, ParseException, SAXException {
         Message.verbose("Loading P2 repository " + repoUri);
 
-        boolean exist = false;
-
         boolean artifactExists = readComposite(repoUri, "compositeArtifacts", p2Descriptor);
         if (!artifactExists) {
             artifactExists = readJarOrXml(repoUri, "artifacts", new P2ArtifactParser(p2Descriptor,
                     repoUri.toURL().toExternalForm()));
         }
-        exist |= artifactExists;
 
         boolean contentExists = readComposite(repoUri, "compositeContent", p2Descriptor);
         if (!contentExists) {
             contentExists = readJarOrXml(repoUri, "content", new P2MetadataParser(p2Descriptor));
         }
-        exist |= artifactExists;
 
-        return exist;
+        return artifactExists || contentExists;
     }
 
     private boolean readComposite(URI repoUri, String name, P2Descriptor p2Descriptor)



Mime
View raw message