You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2012/01/02 01:04:43 UTC
svn commit: r1226320 -
/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoader.java
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)