Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-06 07:50:38 -0400
committerAlexander Kurtakov2017-09-06 08:35:49 -0400
commit6c0135edf1bd792bf107d96a5fa53681dd1ce6f1 (patch)
tree3b1cfd707b645d314ce389580c85c3a144c3e364
parent780d9bedcc73cf2daf808b1a16d68565daba871a (diff)
downloadrt.equinox.p2-6c0135edf1bd792bf107d96a5fa53681dd1ce6f1.tar.gz
rt.equinox.p2-6c0135edf1bd792bf107d96a5fa53681dd1ce6f1.tar.xz
rt.equinox.p2-6c0135edf1bd792bf107d96a5fa53681dd1ce6f1.zip
Bug 313553 - [publisher] publish metadata for Provide-Capability and
Require-Capability Remove redundant type declarations introduced with previous patches. Change-Id: Ia3a8826ee3dc93a66eb0ed445c374091b68c354a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java3
2 files changed, 5 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
index 868d31c6b..baacf2e3b 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
@@ -222,9 +222,9 @@ public class JREAction extends AbstractPublisherAction {
Version parsedVersion = Version.parseVersion(rawVersion);
// complete record -> store
- Map<String, Object> capAttrs = new HashMap<String, Object>();
+ Map<String, Object> capAttrs = new HashMap<>();
capAttrs.put(NAMESPACE_OSGI_EE, eeName);
- capAttrs.put("version", parsedVersion);
+ capAttrs.put("version", parsedVersion); //$NON-NLS-1$
parsingResult.add(MetadataFactory.createProvidedCapability(NAMESPACE_OSGI_EE, capAttrs));
@@ -305,7 +305,7 @@ public class JREAction extends AbstractPublisherAction {
if (jreLocation.isDirectory()) {
//Look for a JRE profile file to set version and capabilities
- File[] profiles = jreLocation.listFiles((FileFilter) pathname -> pathname.getAbsolutePath().endsWith(".profile"));
+ File[] profiles = jreLocation.listFiles((FileFilter) pathname -> pathname.getAbsolutePath().endsWith(".profile")); //$NON-NLS-1$
if (profiles != null && profiles.length > 0) {
javaProfile = profiles[0];
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java
index e743c47bb..37f8355d5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SPIMetadataRepositoryTest.java
@@ -183,7 +183,7 @@ public class SPIMetadataRepositoryTest extends AbstractProvisioningTest {
public SPIProvidedCapability(String namespace, String name, Version version) {
this.namespace = namespace;
- this.attributes = new HashMap<String, Object>();
+ this.attributes = new HashMap<>();
attributes.put(ProvidedCapability.MEMBER_NAME, name);
attributes.put(ProvidedCapability.MEMBER_VERSION, version);
}
@@ -221,6 +221,7 @@ public class SPIMetadataRepositoryTest extends AbstractProvisioningTest {
return false;
}
+ @Override
public Map<String, Object> getAttributes() {
return attributes;
}

Back to the top