Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-01-04 17:49:39 -0500
committerThomas Watson2012-01-04 17:49:39 -0500
commit65aa9312bc621c36b39cfa947c95abcfe96f988c (patch)
tree46a3c4ca7588366a098edf46160d2906a78c5a9b
parent6e11763dc527ed97bd1a72ed0345f81294048da6 (diff)
downloadrt.equinox.framework-65aa9312bc621c36b39cfa947c95abcfe96f988c.tar.gz
rt.equinox.framework-65aa9312bc621c36b39cfa947c95abcfe96f988c.tar.xz
rt.equinox.framework-65aa9312bc621c36b39cfa947c95abcfe96f988c.zip
Fix compile errors because matches method was removed.v20120104-2249
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java
index 3acc47ed9..b4635251a 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 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,13 +10,12 @@
*******************************************************************************/
package org.eclipse.osgi.tests.resource;
-import org.osgi.framework.resource.*;
-
import java.util.*;
import java.util.Map.Entry;
import junit.framework.*;
import org.osgi.framework.Bundle;
import org.osgi.framework.Version;
+import org.osgi.framework.resource.*;
import org.osgi.framework.wiring.*;
public class BasicTest extends AbstractResourceTest {
@@ -445,7 +444,9 @@ public class BasicTest extends AbstractResourceTest {
}
private void assertNotRequirementMatches(Requirement requirement, Capability capability) {
- assertFalse("Requirement matches capability", requirement.matches(capability));
+ if (!(requirement instanceof BundleRequirement) || !(capability instanceof BundleCapability))
+ return;
+ assertFalse("Requirement matches capability", ((BundleRequirement) requirement).matches((BundleCapability) capability));
}
private void assertNotNull(Capability capability) {
@@ -457,7 +458,9 @@ public class BasicTest extends AbstractResourceTest {
}
private void assertRequirementMatches(Requirement requirement, Capability capability) {
- assertTrue("Requirement does not match capability", requirement.matches(capability));
+ if (!(requirement instanceof BundleRequirement) || !(capability instanceof BundleCapability))
+ return;
+ assertTrue("Requirement does not match capability", ((BundleRequirement) requirement).matches((BundleCapability) capability));
}
private void assertRequirements(List requirements, int index) {

Back to the top