Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-04-23 18:25:37 -0400
committerspingel2010-04-23 18:25:37 -0400
commit3406fb18fe52bbabb095892f7f49eb0302366905 (patch)
treee1e22e7208b2871f732851a5fb9ccae880af1880 /bundles/org.eclipse.equinox.p2.tests.discovery
parent717b958d594754eff725288d5bbe9c483a4f31aa (diff)
downloadrt.equinox.p2-3406fb18fe52bbabb095892f7f49eb0302366905.tar.gz
rt.equinox.p2-3406fb18fe52bbabb095892f7f49eb0302366905.tar.xz
rt.equinox.p2-3406fb18fe52bbabb095892f7f49eb0302366905.zip
bug 310229 - Compile warning in official build
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.discovery')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java14
5 files changed, 38 insertions, 38 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java
index 7364fd188..9465da547 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java
@@ -21,6 +21,7 @@ import org.eclipse.equinox.p2.discovery.tests.core.mock.MockBundleDiscoveryStrat
/**
* @author David Green
+ * @author Steffen Pingel
*/
public class BundleDiscoveryStrategyTest extends TestCase {
@@ -32,7 +33,7 @@ public class BundleDiscoveryStrategyTest extends TestCase {
private final List<Certification> certifications = new ArrayList<Certification>();
- private final List<Tag> tags = new ArrayList();
+ private final List<Tag> tags = new ArrayList<Tag>();
@Override
protected void setUp() throws Exception {
@@ -50,20 +51,20 @@ public class BundleDiscoveryStrategyTest extends TestCase {
assertFalse(categories.isEmpty());
assertFalse(connectors.isEmpty());
- CatalogCategory category = findCategoryById("org.eclipse.mylyn.discovery.tests.connectorCategory1");
+ CatalogCategory category = findCategoryById("org.eclipse.mylyn.discovery.tests.connectorCategory1"); //$NON-NLS-1$
assertNotNull(category);
- CatalogItem connector = findConnectorById("org.eclipse.mylyn.discovery.tests.connectorDescriptor1");
+ CatalogItem connector = findConnectorById("org.eclipse.mylyn.discovery.tests.connectorDescriptor1"); //$NON-NLS-1$
assertNotNull(connector);
- Certification certification = findCertificationById("org.eclipse.mylyn.discovery.tests.certification1");
+ Certification certification = findCertificationById("org.eclipse.mylyn.discovery.tests.certification1"); //$NON-NLS-1$
assertNotNull(certification);
}
public void testCustomTag() throws CoreException {
discoveryStrategy.performDiscovery(new NullProgressMonitor());
- CatalogItem connector = findConnectorById("org.eclipse.mylyn.discovery.test.tagged");
- assertEquals(new HashSet<Tag>(Arrays.asList(new Tag("Custom", "Custom"))), connector.getTags());
- assertEquals(Arrays.asList(new Tag("task", "Tasks"), new Tag("Custom", "Custom")), discoveryStrategy.getTags());
+ CatalogItem connector = findConnectorById("org.eclipse.mylyn.discovery.test.tagged"); //$NON-NLS-1$
+ assertEquals(new HashSet<Tag>(Arrays.asList(new Tag("Custom", "Custom"))), connector.getTags()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals(Arrays.asList(new Tag("task", "Tasks"), new Tag("Custom", "Custom")), discoveryStrategy.getTags()); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
}
public void testDiscoveryNoCategoriesPolicy() throws CoreException {
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java
index 3c622addb..daa9a1f63 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java
@@ -20,7 +20,7 @@ public class MockCatalogSource extends AbstractCatalogSource {
@Override
public Object getId() {
- return "mock:mock";
+ return "mock:mock"; //$NON-NLS-1$
}
@Override
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java
index 137b43668..8f867eb07 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.discovery.tests.core.mock;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy;
import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
@@ -30,7 +29,7 @@ public class MockDiscoveryStrategy extends AbstractDiscoveryStrategy {
protected CatalogCategoryMockFactory categoryMockFactory = new CatalogCategoryMockFactory();
@Override
- public void performDiscovery(IProgressMonitor monitor) throws CoreException {
+ public void performDiscovery(IProgressMonitor monitor) {
for (int x = 0; x < categoryCount; ++x) {
CatalogCategory mockCategory = createDiscoveryCategory();
getCategories().add(mockCategory);
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java
index 5bd699c20..828bdf09c 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java
@@ -32,47 +32,47 @@ public class CatalogCategoryComparatorTest extends TestCase {
}
public void testSortByRelevanceInequal() {
- category1.setRelevance("100");
- category2.setRelevance("50");
+ category1.setRelevance("100"); //$NON-NLS-1$
+ category2.setRelevance("50"); //$NON-NLS-1$
assertEquals(-1, comparator.compare(category1, category2));
assertEquals(1, comparator.compare(category2, category1));
}
public void testSortByRelevanceOneNotSpecified() {
- category1.setRelevance("10");
+ category1.setRelevance("10"); //$NON-NLS-1$
assertEquals(-1, comparator.compare(category1, category2));
assertEquals(1, comparator.compare(category2, category1));
}
public void testSortByRelevanceSame() {
- category1.setRelevance("10");
- category1.setName("test");
- category1.setId("1");
- category2.setRelevance("10");
- category2.setName("test");
- category2.setId("1");
+ category1.setRelevance("10"); //$NON-NLS-1$
+ category1.setName("test"); //$NON-NLS-1$
+ category1.setId("1"); //$NON-NLS-1$
+ category2.setRelevance("10"); //$NON-NLS-1$
+ category2.setName("test"); //$NON-NLS-1$
+ category2.setId("1"); //$NON-NLS-1$
assertEquals(0, comparator.compare(category1, category2));
assertEquals(0, comparator.compare(category2, category1));
}
public void testSortByRelevanceSameIdsDiffer() {
- category1.setRelevance("10");
- category1.setName("test");
- category1.setId("a");
- category2.setRelevance("10");
- category2.setName("test");
- category2.setId("b");
+ category1.setRelevance("10"); //$NON-NLS-1$
+ category1.setName("test"); //$NON-NLS-1$
+ category1.setId("a"); //$NON-NLS-1$
+ category2.setRelevance("10"); //$NON-NLS-1$
+ category2.setName("test"); //$NON-NLS-1$
+ category2.setId("b"); //$NON-NLS-1$
assertEquals(-1, comparator.compare(category1, category2));
assertEquals(1, comparator.compare(category2, category1));
}
public void testSortByRelevanceSameNamesDiffer() {
- category1.setRelevance("10");
- category1.setName("a");
- category1.setId("a");
- category2.setRelevance("10");
- category2.setName("b");
- category2.setId("a");
+ category1.setRelevance("10"); //$NON-NLS-1$
+ category1.setName("a"); //$NON-NLS-1$
+ category1.setId("a"); //$NON-NLS-1$
+ category2.setRelevance("10"); //$NON-NLS-1$
+ category2.setName("b"); //$NON-NLS-1$
+ category2.setId("a"); //$NON-NLS-1$
assertEquals(-1, comparator.compare(category1, category2));
assertEquals(1, comparator.compare(category2, category1));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java
index 6be21f22c..04d9b7b2a 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java
@@ -46,13 +46,13 @@ public class CatalogConnectorComparatorTest extends TestCase {
}
public void testOrderByGroup() {
- addGroup("1");
- addGroup("2");
- CatalogItem t1 = addConnectorDescriptor("b", "btest", "2");
- CatalogItem t2 = addConnectorDescriptor("a", "atest", "2");
- CatalogItem t3 = addConnectorDescriptor("c", "ctest", "1");
- CatalogItem t4 = addConnectorDescriptor("d", "dtest", "1");
- CatalogItem t5 = addConnectorDescriptor("0", "0test", null);
+ addGroup("1"); //$NON-NLS-1$
+ addGroup("2"); //$NON-NLS-1$
+ CatalogItem t1 = addConnectorDescriptor("b", "btest", "2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CatalogItem t2 = addConnectorDescriptor("a", "atest", "2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CatalogItem t3 = addConnectorDescriptor("c", "ctest", "1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CatalogItem t4 = addConnectorDescriptor("d", "dtest", "1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CatalogItem t5 = addConnectorDescriptor("0", "0test", null); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(-1, comparator.compare(t2, t1));
assertEquals(1, comparator.compare(t1, t2));

Back to the top