Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hallgren2010-02-19 07:13:19 -0500
committerThomas Hallgren2010-02-19 07:13:19 -0500
commit3a4abd5c6deca5395ea24bb742ab53fa21427f85 (patch)
tree9eb424ba5b281990970f584088d4ceef5bf05111 /bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse
parent273e205c6904675b1b1314b6f4df5f9e962735b5 (diff)
downloadrt.equinox.p2-3a4abd5c6deca5395ea24bb742ab53fa21427f85.tar.gz
rt.equinox.p2-3a4abd5c6deca5395ea24bb742ab53fa21427f85.tar.xz
rt.equinox.p2-3a4abd5c6deca5395ea24bb742ab53fa21427f85.zip
302201 : Unify the two query approaches used in p2
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
index f02a2b74a..d38685e70 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools.tasks;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.util.*;
import org.apache.tools.ant.types.DataType;
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
@@ -19,6 +17,7 @@ import org.eclipse.equinox.internal.p2.metadata.query.IUPropertyQuery;
import org.eclipse.equinox.internal.p2.metadata.query.LatestIUVersionQuery;
import org.eclipse.equinox.p2.internal.repository.tools.Activator;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQuery;
import org.eclipse.equinox.p2.query.PipedQuery;
@@ -112,8 +111,7 @@ public class IUDescription extends DataType {
if (id != null) {
if (version == null || version.length() == 0) {
// Get the latest version of the iu
- queries.add(new InstallableUnitQuery(id));
- queries.add(new LatestIUVersionQuery<IInstallableUnit>());
+ queries.add(new LatestIUVersionQuery<IInstallableUnit>(new InstallableUnitQuery(id)));
} else {
Version iuVersion = Version.parseVersion(version);
queries.add(new InstallableUnitQuery(id, iuVersion));
@@ -146,6 +144,8 @@ public class IUDescription extends DataType {
String value = attributes.get(QUERY_VALUE);
if (name == null)
return null;
+ if (value == null)
+ value = IUPropertyQuery.ANY;
return new IUPropertyQuery(name, value);
}

Back to the top