Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-01-19 11:28:31 -0500
committerThomas Watson2012-01-19 11:28:31 -0500
commit3de265620d8c370f7ca9470536e3a03f4414af19 (patch)
tree8d51b4d761651f0dbb8769ac86b308b0126de066
parent2e949b1a58c7d93f62fdebff512044d0fda3f8a9 (diff)
downloadrt.equinox.framework-3de265620d8c370f7ca9470536e3a03f4414af19.tar.gz
rt.equinox.framework-3de265620d8c370f7ca9470536e3a03f4414af19.tar.xz
rt.equinox.framework-3de265620d8c370f7ca9470536e3a03f4414af19.zip
Bug 369085 - Some pde-build failures are caused by changes to
convert bree to generic requirements
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java7
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java4
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java6
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java1
4 files changed, 14 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java
index 7aa53580d..a84a05812 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osgi.internal.module;
+import org.eclipse.osgi.internal.resolver.GenericSpecificationImpl;
import org.eclipse.osgi.service.resolver.GenericSpecification;
import org.osgi.framework.Constants;
@@ -28,6 +29,10 @@ public class GenericConstraint extends ResolverConstraint {
return (((GenericSpecification) constraint).getResolution() & GenericSpecification.RESOLUTION_OPTIONAL) != 0;
}
+ boolean isFromRequiredEE() {
+ return (((GenericSpecification) constraint).getResolution() & GenericSpecificationImpl.RESOLUTION_FROM_BREE) != 0;
+ }
+
boolean isMultiple() {
return !supplierHasUses && (((GenericSpecification) constraint).getResolution() & GenericSpecification.RESOLUTION_MULTIPLE) != 0;
}
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
index 6f393d795..0b1436e52 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2004, 2012 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -1455,7 +1455,7 @@ public class ResolverImpl implements Resolver {
ResolverImpl.log("Found match: " + capability.getBaseDescription() + ". Wiring"); //$NON-NLS-1$ //$NON-NLS-2$
result = true;
}
- return result ? true : constraint.isOptional();
+ return result ? true : constraint.isOptional() || constraint.isFromRequiredEE();
}
// Resolve the supplied import. Returns true if the import can be resolved, false otherwise
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
index 2e15392a9..34a9c71ab 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,6 +24,10 @@ public class GenericSpecificationImpl extends VersionConstraintImpl implements G
private GenericDescription[] suppliers;
private Map<String, Object> attributes;
private Map<String, String> arbitraryDirectives;
+ /*
+ * Indicates that a generic constraint was from converting the BREE header
+ */
+ public static final int RESOLUTION_FROM_BREE = 0x04;
public String getMatchingFilter() {
synchronized (this.monitor) {
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
index d679d2e7d..dd46fd60c 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
@@ -505,6 +505,7 @@ public class StateBuilder {
filterSpec = filterBuf.append(")").toString(); //$NON-NLS-1$
}
GenericSpecificationImpl spec = new GenericSpecificationImpl();
+ spec.setResolution(GenericSpecificationImpl.RESOLUTION_FROM_BREE);
spec.setType("osgi.ee"); //$NON-NLS-1$
try {
FilterImpl filter = FilterImpl.newInstance(filterSpec);

Back to the top