Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2015-07-17 02:44:50 -0400
committerLars Vogel2015-07-24 06:57:27 -0400
commit431e3f8c9dbdc7fcd2be3707bfa26afae2a79e7f (patch)
treea13a4cd510e773e5e8742a042eb2dd779146f8fe
parentaeb93cd35d8c8e7b5d64ab239e2e3faba9db5aac (diff)
downloadorg.eclipse.tycho-431e3f8c9dbdc7fcd2be3707bfa26afae2a79e7f.tar.gz
org.eclipse.tycho-431e3f8c9dbdc7fcd2be3707bfa26afae2a79e7f.tar.xz
org.eclipse.tycho-431e3f8c9dbdc7fcd2be3707bfa26afae2a79e7f.zip
Bug 472669 - Using the diamond operator in Tycho for Java 1.7 bundles
Cleanup for tycho-p2, tycho-metadata-model, tycho-packaging-plugin, tycho-pomgenerator-plugin, tycho-source-plugin Change-Id: I6c235ad6319ac37ca2aa262b0a6729684c4a74d7 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO279HttpProxy/ProxySupportTest.java2
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/p2Inf/MultienvP2infTest.java2
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/packaging/RepositoryPackedArtifactsTest.java4
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java2
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/sourceBundle/SourceBundlesNestedJarsTest.java2
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/surefire/EnvVarTest.java2
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ParallelTestExecutionTest.java4
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java2
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java4
-rw-r--r--tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java4
-rw-r--r--tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Feature.java8
-rw-r--r--tycho-metadata-model/src/main/java/org/eclipse/tycho/model/IU.java2
-rw-r--r--tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Launcher.java8
-rw-r--r--tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Platform.java6
-rw-r--r--tycho-metadata-model/src/main/java/org/eclipse/tycho/model/ProductConfiguration.java10
-rw-r--r--tycho-metadata-model/src/main/java/org/eclipse/tycho/model/UpdateSite.java4
-rw-r--r--tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/EclipseModelTest.java4
-rw-r--r--tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/ProductConfigurationTest.java2
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/Product.java2
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java2
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductConfig.java4
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/runtime/StandaloneDirectorRuntime.java2
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/tar/TarGzArchiver.java2
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/p2/director/ProductConfigTest.java2
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/FilePermissionHelperTest.java2
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/TarGzArchiverTest.java4
-rw-r--r--tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/RepositoryReferenceTool.java2
-rw-r--r--tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java20
-rw-r--r--tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/TargetDefinitionFile.java6
-rw-r--r--tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/BaselineValidator.java12
-rw-r--r--tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java6
-rw-r--r--tycho-p2/tycho-p2-plugin/src/test/java/org/eclipse/tycho/plugins/p2/P2MetadataMojoTest.java4
-rw-r--r--tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishCategoriesMojo.java2
-rw-r--r--tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishProductMojo.java2
-rw-r--r--tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java2
-rw-r--r--tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/IncludeValidationHelper.java2
-rw-r--r--tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java2
-rw-r--r--tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackageFeatureMojo.java2
-rw-r--r--tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java2
-rw-r--r--tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/ProductExportMojo.java6
-rw-r--r--tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java4
-rw-r--r--tycho-packaging-plugin/src/test/java/org/eclipse/tycho/packaging/IncludeValidationHelperTest.java2
-rw-r--r--tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java16
-rw-r--r--tycho-pomgenerator-plugin/src/test/java/org/eclipse/tycho/pomgenerator/test/GeneratePomsMojoTest.java18
-rw-r--r--tycho-source-plugin/src/main/java/org/eclipse/tycho/source/AbstractSourceJarMojo.java2
-rw-r--r--tycho-source-plugin/src/main/java/org/eclipse/tycho/source/OsgiSourceMojo.java4
46 files changed, 104 insertions, 104 deletions
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO279HttpProxy/ProxySupportTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO279HttpProxy/ProxySupportTest.java
index 4d74d0198..a4d4d85bd 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO279HttpProxy/ProxySupportTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO279HttpProxy/ProxySupportTest.java
@@ -134,7 +134,7 @@ public class ProxySupportTest extends AbstractTychoIntegrationTest {
proxyServer.setPort(proxyPort);
proxyServer.initialize();
- Map<String, String> authMap = new HashMap<String, String>();
+ Map<String, String> authMap = new HashMap<>();
if (useAuthentication) {
authMap.put(user, password);
}
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Inf/MultienvP2infTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Inf/MultienvP2infTest.java
index daf72413f..3e84bb91e 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Inf/MultienvP2infTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Inf/MultienvP2infTest.java
@@ -47,7 +47,7 @@ public class MultienvP2infTest extends AbstractTychoIntegrationTest {
zip.close();
}
- List<String> ids = new ArrayList<String>();
+ List<String> ids = new ArrayList<>();
Element units = doc.getChild("repository/units");
for (Element unit : units.getChildren("unit")) {
ids.add(unit.getAttributeValue("id"));
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/packaging/RepositoryPackedArtifactsTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/packaging/RepositoryPackedArtifactsTest.java
index 10df917f4..f6cf4ce71 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/packaging/RepositoryPackedArtifactsTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/packaging/RepositoryPackedArtifactsTest.java
@@ -45,7 +45,7 @@ public class RepositoryPackedArtifactsTest extends AbstractTychoIntegrationTest
}
private void assertDirectory(File dir, String... expectedFiles) {
- Set<String> actualFiles = new HashSet<String>(Arrays.asList(dir.list()));
- assertEquals(new HashSet<String>(Arrays.asList(expectedFiles)), actualFiles);
+ Set<String> actualFiles = new HashSet<>(Arrays.asList(dir.list()));
+ assertEquals(new HashSet<>(Arrays.asList(expectedFiles)), actualFiles);
}
}
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java b/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java
index 9fef6d3a7..8515e0aa7 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java
@@ -56,7 +56,7 @@ class Util {
}
static public Set<Element> findIU(Document contentXML, String iuId) {
- Set<Element> foundIUs = new HashSet<Element>();
+ Set<Element> foundIUs = new HashSet<>();
Element repository = contentXML.getRootElement();
for (Element unit : repository.getChild("units").getChildren("unit")) {
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/sourceBundle/SourceBundlesNestedJarsTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/sourceBundle/SourceBundlesNestedJarsTest.java
index ab9a4b3f4..e6906578a 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/sourceBundle/SourceBundlesNestedJarsTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/sourceBundle/SourceBundlesNestedJarsTest.java
@@ -38,7 +38,7 @@ public class SourceBundlesNestedJarsTest extends AbstractTychoIntegrationTest {
String sourceBundleHeader = jar.getManifest().getMainAttributes().getValue("Eclipse-SourceBundle");
ManifestElement element = ManifestElement.parseHeader("", sourceBundleHeader)[0];
String[] roots = element.getDirective("roots").split(",");
- assertEquals(new HashSet<String>(asList(".", "foosrc", "barsrc")), new HashSet<String>(asList(roots)));
+ assertEquals(new HashSet<>(asList(".", "foosrc", "barsrc")), new HashSet<>(asList(roots)));
assertNotNull(jar.getEntry("Main.java"));
assertNotNull(jar.getEntry("foosrc/Foo1.java"));
assertNotNull(jar.getEntry("foosrc/Foo2.java"));
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/EnvVarTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/EnvVarTest.java
index f40921a9e..b7944afc1 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/EnvVarTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/EnvVarTest.java
@@ -22,7 +22,7 @@ public class EnvVarTest extends AbstractTychoIntegrationTest {
@Test
public void testEnvironmentVariablesInheritance() throws Exception {
Verifier verifier = getVerifier("surefire.envVars");
- Map<String, String> env = new HashMap<String, String>();
+ Map<String, String> env = new HashMap<>();
env.put("KEY_1", "value_1");
verifier.executeGoal("integration-test", env);
// project contains a test doing the assertions
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ParallelTestExecutionTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ParallelTestExecutionTest.java
index 9203853fc..3de7dd401 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ParallelTestExecutionTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ParallelTestExecutionTest.java
@@ -54,7 +54,7 @@ public class ParallelTestExecutionTest extends AbstractTychoIntegrationTest {
});
assertEquals(2, surefireXmlReports.length);
Set<String> actualTests = extractExecutedTests(surefireXmlReports);
- Set<String> expectedTests = new HashSet<String>(asList("org.eclipse.tychoits.FirstTest#firstTest",
+ Set<String> expectedTests = new HashSet<>(asList("org.eclipse.tychoits.FirstTest#firstTest",
"org.eclipse.tychoits.SecondTest#secondTest"));
assertEquals(expectedTests, actualTests);
}
@@ -62,7 +62,7 @@ public class ParallelTestExecutionTest extends AbstractTychoIntegrationTest {
private Set<String> extractExecutedTests(File[] xmlReports) throws FileNotFoundException, XPathExpressionException,
IOException {
XPath xpath = XPathFactory.newInstance().newXPath();
- Set<String> actualTests = new HashSet<String>();
+ Set<String> actualTests = new HashSet<>();
for (File xmlReportFile : xmlReports) {
FileInputStream xmlStream = new FileInputStream(xmlReportFile);
NodeList testCaseNodes;
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java
index 9c0c4832b..07b707c9b 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java
@@ -59,7 +59,7 @@ public class OfflineModeTest extends AbstractTychoIntegrationTest {
verifier.setLogFileName("log-offline.txt");
verifier.executeGoal("integration-test");
verifier.verifyErrorFreeLog();
- Set<String> urls = new LinkedHashSet<String>(server.getAccessedUrls("test"));
+ Set<String> urls = new LinkedHashSet<>(server.getAccessedUrls("test"));
assertTrue(urls.toString(), urls.isEmpty());
}
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java b/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java
index befb3b832..8c4639f5d 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java
@@ -41,7 +41,7 @@ import org.eclipse.jetty.util.security.Password;
public class HttpServer {
private static class MonitoringServlet extends DefaultServlet {
- private List<String> accessedURIs = new ArrayList<String>();
+ private List<String> accessedURIs = new ArrayList<>();
@Override
public String getInitParameter(String name) {
@@ -80,7 +80,7 @@ public class HttpServer {
private final int port;
- private final Map<String, MonitoringServlet> contextName2servletsMap = new HashMap<String, MonitoringServlet>();
+ private final Map<String, MonitoringServlet> contextName2servletsMap = new HashMap<>();
private ContextHandlerCollection contexts;
diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java
index 77e459340..8bd776720 100644
--- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java
+++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java
@@ -49,7 +49,7 @@ public class Category {
}
public List<SiteFeatureRef> getFeatures() {
- ArrayList<SiteFeatureRef> features = new ArrayList<SiteFeatureRef>();
+ ArrayList<SiteFeatureRef> features = new ArrayList<>();
for (Element featureDom : dom.getChildren("feature")) {
features.add(new SiteFeatureRef(featureDom));
}
@@ -57,7 +57,7 @@ public class Category {
}
public List<PluginRef> getPlugins() {
- ArrayList<PluginRef> plugins = new ArrayList<PluginRef>();
+ ArrayList<PluginRef> plugins = new ArrayList<>();
for (Element pluginDom : dom.getChildren("bundle")) {
plugins.add(new PluginRef(pluginDom));
}
diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Feature.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Feature.java
index d805e1ba0..4146751e7 100644
--- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Feature.java
+++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Feature.java
@@ -64,7 +64,7 @@ public class Feature {
public List<PluginRef> getPlugins() {
if (plugins == null) {
- plugins = new ArrayList<PluginRef>();
+ plugins = new ArrayList<>();
for (Element pluginDom : dom.getChildren("plugin")) {
plugins.add(new PluginRef(pluginDom));
}
@@ -78,7 +78,7 @@ public class Feature {
public List<FeatureRef> getIncludedFeatures() {
if (features == null) {
- features = new ArrayList<FeatureRef>();
+ features = new ArrayList<>();
for (Element featureDom : dom.getChildren("includes")) {
features.add(new FeatureRef(featureDom));
}
@@ -87,7 +87,7 @@ public class Feature {
}
public List<RequiresRef> getRequires() {
- ArrayList<RequiresRef> requires = new ArrayList<RequiresRef>();
+ ArrayList<RequiresRef> requires = new ArrayList<>();
for (Element requiresDom : dom.getChildren("requires")) {
requires.add(new RequiresRef(requiresDom));
}
@@ -103,7 +103,7 @@ public class Feature {
}
public List<ImportRef> getImports() {
- ArrayList<ImportRef> imports = new ArrayList<ImportRef>();
+ ArrayList<ImportRef> imports = new ArrayList<>();
for (Element importsDom : dom.getChildren("import")) {
imports.add(new ImportRef(importsDom));
}
diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/IU.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/IU.java
index 1d324ee87..4fe405c9b 100644
--- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/IU.java
+++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/IU.java
@@ -86,7 +86,7 @@ public class IU {
}
public List<Element> getSelfCapabilities() {
- List<Element> selfCapabilities = new ArrayList<Element>(1);
+ List<Element> selfCapabilities = new ArrayList<>(1);
List<Element> providedCapabilities = getProvidedCapabilites();
if (providedCapabilities == null)
return selfCapabilities;
diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Launcher.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Launcher.java
index 6e1e42859..5b525410f 100644
--- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Launcher.java
+++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Launcher.java
@@ -61,7 +61,7 @@ public class Launcher {
if (linuxDom == null) {
return Collections.emptyMap();
}
- Map<String, String> linux = new HashMap<String, String>();
+ Map<String, String> linux = new HashMap<>();
putIfNotNull(linux, ICON_LINUX, linuxDom.getAttributeValue(ICON_LINUX));
return Collections.unmodifiableMap(linux);
}
@@ -71,7 +71,7 @@ public class Launcher {
if (macosxDom == null) {
return Collections.emptyMap();
}
- Map<String, String> mac = new HashMap<String, String>();
+ Map<String, String> mac = new HashMap<>();
putIfNotNull(mac, ICON_LINUX, macosxDom.getAttributeValue(ICON_LINUX));
return Collections.unmodifiableMap(mac);
}
@@ -81,7 +81,7 @@ public class Launcher {
if (solarisDom == null) {
return Collections.emptyMap();
}
- Map<String, String> solaris = new HashMap<String, String>();
+ Map<String, String> solaris = new HashMap<>();
putIfNotNull(solaris, ICON_SOLARIS_LARGE, solarisDom.getAttributeValue(ICON_SOLARIS_LARGE));
putIfNotNull(solaris, ICON_SOLARIS_MEDIUM, solarisDom.getAttributeValue(ICON_SOLARIS_MEDIUM));
putIfNotNull(solaris, ICON_SOLARIS_SMALL, solarisDom.getAttributeValue(ICON_SOLARIS_SMALL));
@@ -103,7 +103,7 @@ public class Launcher {
if (winDom == null) {
return Collections.emptyMap();
}
- Map<String, String> windows = new HashMap<String, String>();
+ Map<String, String> windows = new HashMap<>();
if (getWindowsUseIco()) {
Element ico = winDom.getChild("ico");
if (ico != null) {
diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Platform.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Platform.java
index 9fdbb4102..bacac3fc8 100644
--- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Platform.java
+++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Platform.java
@@ -75,7 +75,7 @@ public class Platform {
}
public List<Feature> getFeatures() {
- ArrayList<Feature> features = new ArrayList<Feature>();
+ ArrayList<Feature> features = new ArrayList<>();
for (Xpp3Dom featureDom : dom.getChildren("feature")) {
features.add(new Feature(featureDom));
}
@@ -83,7 +83,7 @@ public class Platform {
}
public List<String> getPlugins() {
- ArrayList<String> plugins = new ArrayList<String>();
+ ArrayList<String> plugins = new ArrayList<>();
String pluginsStr = getPluginsStr();
if (pluginsStr != null) {
StringTokenizer st = new StringTokenizer(pluginsStr, ",");
@@ -196,7 +196,7 @@ public class Platform {
}
public List<Site> getSites() {
- ArrayList<Site> sites = new ArrayList<Site>();
+ ArrayList<Site> sites = new ArrayList<>();
for (Xpp3Dom siteDom : dom.getChildren("site")) {
sites.add(new Site(siteDom));
}
diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/ProductConfiguration.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/ProductConfiguration.java
index faa95a9a4..c450a7418 100644
--- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/ProductConfiguration.java
+++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/ProductConfiguration.java
@@ -97,7 +97,7 @@ public class ProductConfiguration {
return Collections.emptyList();
}
- ArrayList<FeatureRef> features = new ArrayList<FeatureRef>();
+ ArrayList<FeatureRef> features = new ArrayList<>();
for (Element featureDom : featuresDom.getChildren()) {
features.add(parseFeature(featureDom));
}
@@ -153,7 +153,7 @@ public class ProductConfiguration {
return Collections.emptyList();
}
- ArrayList<PluginRef> plugins = new ArrayList<PluginRef>();
+ ArrayList<PluginRef> plugins = new ArrayList<>();
for (Element pluginDom : pluginsDom.getChildren("plugin")) {
plugins.add(new PluginRef(pluginDom));
}
@@ -187,7 +187,7 @@ public class ProductConfiguration {
if (win == null) {
return null;
}
- List<String> icons = new ArrayList<String>();
+ List<String> icons = new ArrayList<>();
String useIco = win.getAttributeValue("useIco");
if (Boolean.valueOf(useIco)) {
// for (Element ico : win.getChildren("ico"))
@@ -226,7 +226,7 @@ public class ProductConfiguration {
return null;
}
- Map<String, BundleConfiguration> configs = new HashMap<String, BundleConfiguration>();
+ Map<String, BundleConfiguration> configs = new HashMap<>();
for (Element pluginDom : configurationsDom.getChildren("plugin")) {
configs.put(pluginDom.getAttributeValue("id"), new BundleConfiguration(pluginDom));
}
@@ -244,7 +244,7 @@ public class ProductConfiguration {
return null;
}
- List<ConfigurationProperty> properties = new ArrayList<ConfigurationProperty>();
+ List<ConfigurationProperty> properties = new ArrayList<>();
for (Element properyDom : propertyDoms) {
properties.add(new ConfigurationProperty(properyDom));
}
diff --git a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/UpdateSite.java b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/UpdateSite.java
index ccd73c5bb..39b4dc062 100644
--- a/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/UpdateSite.java
+++ b/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/UpdateSite.java
@@ -59,7 +59,7 @@ public class UpdateSite {
}
public List<SiteFeatureRef> getFeatures() {
- ArrayList<SiteFeatureRef> features = new ArrayList<SiteFeatureRef>();
+ ArrayList<SiteFeatureRef> features = new ArrayList<>();
for (Element featureDom : dom.getChildren("feature")) {
features.add(new SiteFeatureRef(featureDom));
}
@@ -67,7 +67,7 @@ public class UpdateSite {
}
public Map<String, String> getArchives() {
- Map<String, String> archives = new HashMap<String, String>();
+ Map<String, String> archives = new HashMap<>();
for (Element archiveDom : dom.getChildren("archive")) {
String path = archiveDom.getAttributeValue("path");
String url = archiveDom.getAttributeValue("url");
diff --git a/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/EclipseModelTest.java b/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/EclipseModelTest.java
index df365798e..2c1109f56 100644
--- a/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/EclipseModelTest.java
+++ b/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/EclipseModelTest.java
@@ -135,12 +135,12 @@ public class EclipseModelTest extends TestCase {
Platform.Site transientSite = new Platform.Site("file:/xxx");
transientPlatform.addSite(transientSite);
- List<String> transientPlugins = new ArrayList<String>();
+ List<String> transientPlugins = new ArrayList<>();
transientPlugins.add("plugins/yyy/");
transientPlugins.add("plugins/zzz/");
transientSite.setPlugins(transientPlugins);
- List<Platform.Feature> transientFeatures = new ArrayList<Platform.Feature>();
+ List<Platform.Feature> transientFeatures = new ArrayList<>();
Platform.Feature transientFeature = new Platform.Feature();
transientFeature.setId("transient.feature");
diff --git a/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/ProductConfigurationTest.java b/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/ProductConfigurationTest.java
index fd195e473..49994a360 100644
--- a/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/ProductConfigurationTest.java
+++ b/tycho-metadata-model/src/test/java/org/eclipse/tycho/maven/test/ProductConfigurationTest.java
@@ -144,7 +144,7 @@ public class ProductConfigurationTest {
}
private static Map<String, InstallMode> getInstallModes(ProductConfiguration config) {
- Map<String, InstallMode> modes = new HashMap<String, InstallMode>();
+ Map<String, InstallMode> modes = new HashMap<>();
for (FeatureRef featureRef : config.getFeatures()) {
modes.put(featureRef.getId(), featureRef.getInstallMode());
}
diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/Product.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/Product.java
index 11cb02dbf..07c3a563b 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/Product.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/Product.java
@@ -96,7 +96,7 @@ public final class Product {
public void addInstallationSeed(DependencySeed seed) {
if (extraInstallationSeeds == null) {
- extraInstallationSeeds = new ArrayList<DependencySeed>();
+ extraInstallationSeeds = new ArrayList<>();
}
extraInstallationSeeds.add(seed);
}
diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
index bca1c0eb8..5a86bddc4 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
@@ -83,7 +83,7 @@ public final class ProductArchiverMojo extends AbstractProductMojo {
private MavenProjectHelper helper;
public ProductArchiverMojo() {
- productArchivers = new HashMap<String, ProductArchiver>();
+ productArchivers = new HashMap<>();
productArchivers.put("zip", new ProductArchiver() {
@Override
diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductConfig.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductConfig.java
index 0512780b8..1042bb37d 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductConfig.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductConfig.java
@@ -67,7 +67,7 @@ class ProductConfig {
}
private static List<Product> getPublishedProduct(Collection<DependencySeed> projectSeeds) {
- List<Product> result = new ArrayList<Product>(1);
+ List<Product> result = new ArrayList<>(1);
// publishing results are added to the dependency seeds of the project, so we can find the products there
for (DependencySeed seed : projectSeeds) {
@@ -91,7 +91,7 @@ class ProductConfig {
}
public boolean uniqueAttachIds() {
- Set<String> attachIDs = new HashSet<String>();
+ Set<String> attachIDs = new HashSet<>();
for (Product product : products) {
if (!attachIDs.contains(product.getAttachId())) {
attachIDs.add(product.getAttachId());
diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/runtime/StandaloneDirectorRuntime.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/runtime/StandaloneDirectorRuntime.java
index 755c0c78f..e21779a70 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/runtime/StandaloneDirectorRuntime.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/runtime/StandaloneDirectorRuntime.java
@@ -49,7 +49,7 @@ public class StandaloneDirectorRuntime implements DirectorRuntime {
@Override
public void execute() throws DirectorCommandException {
- List<String> programArguments = new ArrayList<String>();
+ List<String> programArguments = new ArrayList<>();
programArguments.add("-application");
programArguments.add("org.eclipse.equinox.p2.director");
programArguments.addAll(getDirectorApplicationArguments());
diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/tar/TarGzArchiver.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/tar/TarGzArchiver.java
index 70030e67b..a1ab222d4 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/tar/TarGzArchiver.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/tar/TarGzArchiver.java
@@ -48,7 +48,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
public class TarGzArchiver {
private File destFile;
- private List<File> sourceDirs = new ArrayList<File>();
+ private List<File> sourceDirs = new ArrayList<>();
private Log log = new SystemStreamLog();
public TarGzArchiver() {
diff --git a/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/p2/director/ProductConfigTest.java b/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/p2/director/ProductConfigTest.java
index 788f2da98..c172a0e44 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/p2/director/ProductConfigTest.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/p2/director/ProductConfigTest.java
@@ -27,7 +27,7 @@ public class ProductConfigTest {
private ProductConfig subject;
- private List<DependencySeed> projectSeeds = new ArrayList<DependencySeed>();
+ private List<DependencySeed> projectSeeds = new ArrayList<>();
@Test
public void testNoConfigAndNothingPublished() throws Exception {
diff --git a/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/FilePermissionHelperTest.java b/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/FilePermissionHelperTest.java
index c0d8b7bf9..e8d5ecfad 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/FilePermissionHelperTest.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/FilePermissionHelperTest.java
@@ -37,6 +37,6 @@ public class FilePermissionHelperTest {
}
private Set<PosixFilePermission> createPermissionSet(PosixFilePermission... perms) {
- return new HashSet<PosixFilePermission>(asList(perms));
+ return new HashSet<>(asList(perms));
}
}
diff --git a/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/TarGzArchiverTest.java b/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/TarGzArchiverTest.java
index 6aa55b23d..020d63883 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/TarGzArchiverTest.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/test/java/org/eclipse/tycho/plugins/tar/TarGzArchiverTest.java
@@ -176,7 +176,7 @@ public class TarGzArchiverTest {
private void setPermissionsTo700() {
try {
- Set<PosixFilePermission> perms = new HashSet<PosixFilePermission>();
+ Set<PosixFilePermission> perms = new HashSet<>();
perms.add(PosixFilePermission.OWNER_READ);
perms.add(PosixFilePermission.OWNER_WRITE);
perms.add(PosixFilePermission.OWNER_EXECUTE);
@@ -209,7 +209,7 @@ public class TarGzArchiverTest {
private Map<String, TarArchiveEntry> getTarEntries() throws IOException, FileNotFoundException {
TarArchiveInputStream tarStream = new TarArchiveInputStream(new GzipCompressorInputStream(new FileInputStream(
tarGzArchive)));
- Map<String, TarArchiveEntry> entries = new HashMap<String, TarArchiveEntry>();
+ Map<String, TarArchiveEntry> entries = new HashMap<>();
try {
TarArchiveEntry tarEntry = null;
while ((tarEntry = tarStream.getNextTarEntry()) != null) {
diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/RepositoryReferenceTool.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/RepositoryReferenceTool.java
index 2a61d5be2..afc5d1f58 100644
--- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/RepositoryReferenceTool.java
+++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/RepositoryReferenceTool.java
@@ -125,7 +125,7 @@ public class RepositoryReferenceTool {
targetPlatform, DefaultReactorProject.adapt(session), resolverConfiguration);
// this contains dependency-only metadata for 'this' project
- Set<Object> targetPlatformInstallableUnits = new HashSet<Object>(
+ Set<Object> targetPlatformInstallableUnits = new HashSet<>(
dependencyArtifacts.getInstallableUnits());
for (ArtifactDescriptor artifact : dependencyArtifacts.getArtifacts()) {
diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java
index f24ce72ca..b95f495cc 100644
--- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java
+++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java
@@ -129,8 +129,8 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
List<TargetEnvironment> environments = configuration.getEnvironments();
Map<String, IDependencyMetadata> metadata = getDependencyMetadata(session, project, environments,
OptionalResolutionAction.OPTIONAL);
- Set<Object> primaryMetadata = new LinkedHashSet<Object>();
- Set<Object> secondaryMetadata = new LinkedHashSet<Object>();
+ Set<Object> primaryMetadata = new LinkedHashSet<>();
+ Set<Object> secondaryMetadata = new LinkedHashSet<>();
for (Map.Entry<String, IDependencyMetadata> entry : metadata.entrySet()) {
primaryMetadata.addAll(entry.getValue().getMetadata(true));
secondaryMetadata.addAll(entry.getValue().getMetadata(false));
@@ -143,7 +143,7 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
final MavenProject project, final List<TargetEnvironment> environments,
final OptionalResolutionAction optionalAction) {
- final Map<String, IDependencyMetadata> metadata = new LinkedHashMap<String, IDependencyMetadata>();
+ final Map<String, IDependencyMetadata> metadata = new LinkedHashMap<>();
metadata.put(null, generator.generateMetadata(new AttachedArtifact(project, project.getBasedir(), null),
environments, optionalAction));
@@ -233,8 +233,8 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
.getOptionalResolutionAction();
Map<String, IDependencyMetadata> dependencyMetadata = getDependencyMetadata(session, project, environments,
optionalAction);
- final Set<Object> metadata = new LinkedHashSet<Object>();
- final Set<Object> secondaryMetadata = new LinkedHashSet<Object>();
+ final Set<Object> metadata = new LinkedHashSet<>();
+ final Set<Object> secondaryMetadata = new LinkedHashSet<>();
for (Map.Entry<String, IDependencyMetadata> entry : dependencyMetadata.entrySet()) {
metadata.addAll(entry.getValue().getMetadata(true));
secondaryMetadata.addAll(entry.getValue().getMetadata(false));
@@ -250,19 +250,19 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
private PomDependencyCollector collectPomDependencies(MavenProject project, List<ReactorProject> reactorProjects,
MavenSession session) {
- Set<String> projectIds = new HashSet<String>();
+ Set<String> projectIds = new HashSet<>();
for (ReactorProject p : reactorProjects) {
String key = ArtifactUtils.key(p.getGroupId(), p.getArtifactId(), p.getVersion());
projectIds.add(key);
}
- ArrayList<String> scopes = new ArrayList<String>();
+ ArrayList<String> scopes = new ArrayList<>();
scopes.add(Artifact.SCOPE_COMPILE);
Collection<Artifact> artifacts;
try {
artifacts = projectDependenciesResolver.resolve(project, scopes, session);
} catch (MultipleArtifactsNotFoundException e) {
- Collection<Artifact> missing = new HashSet<Artifact>(e.getMissingArtifacts());
+ Collection<Artifact> missing = new HashSet<>(e.getMissingArtifacts());
for (Iterator<Artifact> it = missing.iterator(); it.hasNext();) {
Artifact a = it.next();
@@ -281,7 +281,7 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
} catch (AbstractArtifactResolutionException e) {
throw new RuntimeException("Could not resolve project dependencies", e);
}
- List<Artifact> externalArtifacts = new ArrayList<Artifact>(artifacts.size());
+ List<Artifact> externalArtifacts = new ArrayList<>(artifacts.size());
for (Artifact artifact : artifacts) {
String key = ArtifactUtils.key(artifact.getGroupId(), artifact.getArtifactId(), artifact.getBaseVersion());
if (projectIds.contains(key)) {
@@ -340,7 +340,7 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
List<ReactorProject> reactorProjects, DependencyResolverConfiguration resolverConfiguration,
TargetPlatform targetPlatform, P2Resolver resolver, TargetPlatformConfiguration configuration) {
- Map<File, ReactorProject> projects = new HashMap<File, ReactorProject>();
+ Map<File, ReactorProject> projects = new HashMap<>();
resolver.setEnvironments(configuration.getEnvironments());
resolver.setAdditionalFilterProperties(configuration.getProfileProperties());
diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/TargetDefinitionFile.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/TargetDefinitionFile.java
index 6b3c56fb8..b78041d02 100644
--- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/TargetDefinitionFile.java
+++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/TargetDefinitionFile.java
@@ -61,7 +61,7 @@ public final class TargetDefinitionFile implements TargetDefinition {
@Override
public List<? extends TargetDefinition.Unit> getUnits() {
- ArrayList<Unit> units = new ArrayList<Unit>();
+ ArrayList<Unit> units = new ArrayList<>();
for (Element unitDom : dom.getChildren("unit")) {
units.add(new Unit(unitDom));
}
@@ -76,7 +76,7 @@ public final class TargetDefinitionFile implements TargetDefinition {
public List<Repository> getRepositoryImpls() {
final List<Element> repositoryNodes = dom.getChildren("repository");
- final List<Repository> repositories = new ArrayList<TargetDefinitionFile.Repository>(repositoryNodes.size());
+ final List<Repository> repositories = new ArrayList<>(repositoryNodes.size());
for (Element node : repositoryNodes) {
repositories.add(new Repository(node));
}
@@ -218,7 +218,7 @@ public final class TargetDefinitionFile implements TargetDefinition {
@Override
public List<? extends TargetDefinition.Location> getLocations() {
- ArrayList<TargetDefinition.Location> locations = new ArrayList<TargetDefinition.Location>();
+ ArrayList<TargetDefinition.Location> locations = new ArrayList<>();
Element locationsDom = dom.getChild("locations");
if (locationsDom != null) {
for (Element locationDom : locationsDom.getChildren("location")) {
diff --git a/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/BaselineValidator.java b/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/BaselineValidator.java
index 255fb2818..b68d2c709 100644
--- a/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/BaselineValidator.java
+++ b/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/BaselineValidator.java
@@ -73,7 +73,7 @@ public class BaselineValidator {
Map<String, IP2Artifact> result = reactorMetadata;
if (baselineMode != disable && baselineRepositories != null && !baselineRepositories.isEmpty()) {
- List<MavenRepositoryLocation> _repositories = new ArrayList<MavenRepositoryLocation>();
+ List<MavenRepositoryLocation> _repositories = new ArrayList<>();
for (Repository repository : baselineRepositories) {
if (repository.getUrl() != null) {
_repositories.add(new MavenRepositoryLocation(repository.getId(), repository.getUrl()));
@@ -109,10 +109,10 @@ public class BaselineValidator {
}
if (baselineReplace != none) {
- result = new LinkedHashMap<String, IP2Artifact>();
+ result = new LinkedHashMap<>();
// replace reactor artifacts with baseline
- ArrayList<String> replaced = new ArrayList<String>();
+ ArrayList<String> replaced = new ArrayList<>();
for (Map.Entry<String, IP2Artifact> artifact : baselineMetadata.entrySet()) {
String classifier = artifact.getKey();
FileUtils.copyFile(artifact.getValue().getLocation(), reactorMetadata.get(classifier)
@@ -124,8 +124,8 @@ public class BaselineValidator {
}
// un-attach and delete artifacts present in reactor but not in baseline
- ArrayList<String> removed = new ArrayList<String>();
- ArrayList<String> inconsistent = new ArrayList<String>();
+ ArrayList<String> removed = new ArrayList<>();
+ ArrayList<String> inconsistent = new ArrayList<>();
for (Map.Entry<String, IP2Artifact> entry : reactorMetadata.entrySet()) {
String classifier = entry.getKey();
IP2Artifact artifact = entry.getValue();
@@ -195,7 +195,7 @@ public class BaselineValidator {
private CompoundArtifactDelta getDelta(BaselineService baselineService, Map<String, IP2Artifact> baselineMetadata,
Map<String, IP2Artifact> generatedMetadata) throws IOException {
- Map<String, ArtifactDelta> result = new LinkedHashMap<String, ArtifactDelta>();
+ Map<String, ArtifactDelta> result = new LinkedHashMap<>();
// baseline never includes more artifacts
for (Entry<String, IP2Artifact> classifierEntry : generatedMetadata.entrySet()) {
diff --git a/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java b/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java
index 364175646..86ff51f96 100644
--- a/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java
+++ b/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java
@@ -131,7 +131,7 @@ public class P2MetadataMojo extends AbstractMojo {
ArtifactFacade projectDefaultArtifact = new ArtifactFacade(project.getArtifact());
try {
- List<IArtifactFacade> artifacts = new ArrayList<IArtifactFacade>();
+ List<IArtifactFacade> artifacts = new ArrayList<>();
artifacts.add(projectDefaultArtifact);
@@ -161,7 +161,7 @@ public class P2MetadataMojo extends AbstractMojo {
ReactorProject reactorProject = DefaultReactorProject.adapt(project);
- Set<Object> installableUnits = new LinkedHashSet<Object>();
+ Set<Object> installableUnits = new LinkedHashSet<>();
for (Map.Entry<String, IP2Artifact> entry : generatedMetadata.entrySet()) {
String classifier = entry.getKey();
IP2Artifact p2artifact = entry.getValue();
@@ -209,7 +209,7 @@ public class P2MetadataMojo extends AbstractMojo {
* <code>null</code> is mapped to the project's main artifact.
*/
private static Map<String, File> getAllProjectArtifacts(MavenProject project) {
- Map<String, File> artifacts = new HashMap<String, File>();
+ Map<String, File> artifacts = new HashMap<>();
Artifact mainArtifact = project.getArtifact();
if (mainArtifact != null) {
artifacts.put(null, mainArtifact.getFile());
diff --git a/tycho-p2/tycho-p2-plugin/src/test/java/org/eclipse/tycho/plugins/p2/P2MetadataMojoTest.java b/tycho-p2/tycho-p2-plugin/src/test/java/org/eclipse/tycho/plugins/p2/P2MetadataMojoTest.java
index e2f6aec56..31aa7e764 100644
--- a/tycho-p2/tycho-p2-plugin/src/test/java/org/eclipse/tycho/plugins/p2/P2MetadataMojoTest.java
+++ b/tycho-p2/tycho-p2-plugin/src/test/java/org/eclipse/tycho/plugins/p2/P2MetadataMojoTest.java
@@ -45,7 +45,7 @@ public class P2MetadataMojoTest {
@Test
public void testWriteArtifactLocations() throws Exception {
- Map<String, File> artifactLocations = new HashMap<String, File>();
+ Map<String, File> artifactLocations = new HashMap<>();
artifactLocations.put(null, MAIN_ARTIFACT);
artifactLocations.put("source", SOURCE_ARTIFACT);
artifactLocations.put("other-classifier", OTHER_ARTIFACT);
@@ -61,7 +61,7 @@ public class P2MetadataMojoTest {
@Test
public void testWriteOnlyAttachedArtifactLocation() throws Exception {
- Map<String, File> artifactLocations = new HashMap<String, File>();
+ Map<String, File> artifactLocations = new HashMap<>();
artifactLocations.put("other-classifier", OTHER_ARTIFACT);
P2MetadataMojo.writeArtifactLocations(testFile, artifactLocations);
diff --git a/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishCategoriesMojo.java b/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishCategoriesMojo.java
index 9553eb2b7..0a8403631 100644
--- a/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishCategoriesMojo.java
+++ b/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishCategoriesMojo.java
@@ -46,7 +46,7 @@ public final class PublishCategoriesMojo extends AbstractPublishMojo {
getEnvironments());
try {
- List<DependencySeed> categoryIUs = new ArrayList<DependencySeed>();
+ List<DependencySeed> categoryIUs = new ArrayList<>();
for (Category category : getCategories()) {
final File buildCategoryFile = prepareBuildCategory(category, getBuildDirectory());
diff --git a/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishProductMojo.java b/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishProductMojo.java
index 7ff153407..417d50419 100644
--- a/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishProductMojo.java
+++ b/tycho-p2/tycho-p2-publisher-plugin/src/main/java/org/eclipse/tycho/plugins/p2/publisher/PublishProductMojo.java
@@ -76,7 +76,7 @@ public final class PublishProductMojo extends AbstractPublishMojo {
PublishProductTool publisher = publisherServiceFactory.createProductPublisher(getReactorProject(),
getEnvironments(), getQualifier(), interpolator);
- List<DependencySeed> seeds = new ArrayList<DependencySeed>();
+ List<DependencySeed> seeds = new ArrayList<>();
for (File productFile : getEclipseRepositoryProject().getProductFiles(getProject())) {
try {
ProductConfiguration productConfiguration = ProductConfiguration.read(productFile);
diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java
index d2d97c850..6068b3f52 100644
--- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java
+++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java
@@ -85,7 +85,7 @@ public abstract class AbstractTychoPackagingMojo extends AbstractMojo {
fileSet.setIncludes(includes.toArray(new String[includes.size()]));
}
- Set<String> allExcludes = new LinkedHashSet<String>();
+ Set<String> allExcludes = new LinkedHashSet<>();
if (excludes != null) {
allExcludes.addAll(excludes);
}
diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/IncludeValidationHelper.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/IncludeValidationHelper.java
index 08101c7de..4ae4e1a2f 100644
--- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/IncludeValidationHelper.java
+++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/IncludeValidationHelper.java
@@ -50,7 +50,7 @@ public class IncludeValidationHelper {
private void checkIncludesExist(String buildPropertiesKey, List<String> includePatterns, MavenProject project,
boolean strict, String... ignoredIncludes) throws MojoExecutionException {
File baseDir = project.getBasedir();
- List<String> nonMatchingIncludes = new ArrayList<String>();
+ List<String> nonMatchingIncludes = new ArrayList<>();
List<String> ignoreList = Arrays.asList(ignoredIncludes);
if (includePatterns == null || includePatterns.isEmpty()) {
String message = new File(baseDir, "build.properties").getAbsolutePath() + ": " + buildPropertiesKey
diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java
index edf4f3d9e..4e6f99501 100644
--- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java
+++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java
@@ -109,7 +109,7 @@ public class LicenseFeatureHelper {
List<String> includes = buildProperties.getBinIncludes();
- Set<String> excludes = new HashSet<String>(buildProperties.getBinExcludes());
+ Set<String> excludes = new HashSet<>(buildProperties.getBinExcludes());
excludes.add(Feature.FEATURE_XML);
excludes.add("feature.properties");
excludes.add(BuildPropertiesParser.BUILD_PROPERTIES);
diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackageFeatureMojo.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackageFeatureMojo.java
index 412a52853..1c60a20f6 100644
--- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackageFeatureMojo.java
+++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackageFeatureMojo.java
@@ -231,7 +231,7 @@ public class PackageFeatureMojo extends AbstractTychoPackagingMojo {
* automatically.
*/
private FileSet getManuallyIncludedFiles(BuildProperties buildProperties) {
- List<String> binExcludes = new ArrayList<String>(buildProperties.getBinExcludes());
+ List<String> binExcludes = new ArrayList<>(buildProperties.getBinExcludes());
binExcludes.add(Feature.FEATURE_XML); // we'll include updated feature.xml
binExcludes.add(FEATURE_PROPERTIES); // we'll include updated feature.properties
return getFileSet(basedir, buildProperties.getBinIncludes(), binExcludes);
diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java
index e1afeb40c..1dec07b0f 100644
--- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java
+++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java
@@ -209,7 +209,7 @@ public class PackagePluginMojo extends AbstractTychoPackagingMojo {
}
}
}
- List<String> binIncludesIgnoredForValidation = new ArrayList<String>();
+ List<String> binIncludesIgnoredForValidation = new ArrayList<>();
// 2. handle dir classpath entries and "."
for (BuildOutputJar outputJar : pdeProject.getOutputJarMap().values()) {
String jarName = outputJar.getName();
diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/ProductExportMojo.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/ProductExportMojo.java
index ff1730d35..965e3a2c7 100644
--- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/ProductExportMojo.java
+++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/ProductExportMojo.java
@@ -470,7 +470,7 @@ public class ProductExportMojo extends AbstractTychoPackagingMojo {
Map<String, BundleConfiguration> bundlesToStart = productConfiguration.getPluginConfiguration();
if (bundlesToStart == null) {
- bundlesToStart = new HashMap<String, BundleConfiguration>();
+ bundlesToStart = new HashMap<>();
// This is the wellknown set of bundles for Eclipse based application for 3.3 and 3.4 without p2
bundlesToStart.put("org.eclipse.equinox.common", //
@@ -481,7 +481,7 @@ public class ProductExportMojo extends AbstractTychoPackagingMojo {
new BundleConfiguration("org.eclipse.core.runtime", -1, true));
}
- Map<String, PluginDescription> bundles = new LinkedHashMap<String, PluginDescription>(getBundles(environment));
+ Map<String, PluginDescription> bundles = new LinkedHashMap<>(getBundles(environment));
StringBuilder osgiBundles = new StringBuilder();
for (PluginDescription plugin : bundles.values()) {
@@ -521,7 +521,7 @@ public class ProductExportMojo extends AbstractTychoPackagingMojo {
}
private Map<String, PluginDescription> getBundles(TargetEnvironment environment) {
- final Map<String, PluginDescription> bundles = new LinkedHashMap<String, PluginDescription>();
+ final Map<String, PluginDescription> bundles = new LinkedHashMap<>();
getDependencyWalker(environment).walk(new ArtifactDependencyVisitor() {
@Override
public void visitPlugin(PluginDescription plugin) {
diff --git a/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java b/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java
index 80c659b58..4f8dc43b0 100644
--- a/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java
+++ b/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java
@@ -74,7 +74,7 @@ public class BuildQualifierTest extends AbstractTychoMojoTestCase {
MavenProject project = getProject("projects/buildqualifier", "p001/pom.xml");
project.getProperties().put(BUILD_QUALIFIER_PROPERTY, "garbage");
- ArrayList<MavenProject> projects = new ArrayList<MavenProject>();
+ ArrayList<MavenProject> projects = new ArrayList<>();
projects.add(project);
BuildQualifierMojo mojo = createMojoWithProject(project);
@@ -227,7 +227,7 @@ public class BuildQualifierTest extends AbstractTychoMojoTestCase {
}
private BuildQualifierMojo createMojoWithProject(MavenProject project) throws IOException, Exception {
- ArrayList<MavenProject> projects = new ArrayList<MavenProject>();
+ ArrayList<MavenProject> projects = new ArrayList<>();
projects.add(project);
MavenSession session = newMavenSession(projects.get(0), projects);
BuildQualifierMojo mojo = getMojo(project, session);
diff --git a/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/packaging/IncludeValidationHelperTest.java b/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/packaging/IncludeValidationHelperTest.java
index 20e5eaade..016b8d9d2 100644
--- a/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/packaging/IncludeValidationHelperTest.java
+++ b/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/packaging/IncludeValidationHelperTest.java
@@ -89,7 +89,7 @@ public class IncludeValidationHelperTest {
@Test
public void testWarning() throws Exception {
- final List<String> warnings = new ArrayList<String>();
+ final List<String> warnings = new ArrayList<>();
Logger log = new AbstractLogger(Logger.LEVEL_DEBUG, null) {
diff --git a/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java b/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java
index 7c21847fd..593f39ecd 100644
--- a/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java
+++ b/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java
@@ -175,7 +175,7 @@ public class GeneratePomsMojo extends AbstractMojo {
MavenXpp3Reader modelReader = new MavenXpp3Reader();
MavenXpp3Writer modelWriter = new MavenXpp3Writer();
- private Map<File, Model> updateSites = new LinkedHashMap<File, Model>();
+ private Map<File, Model> updateSites = new LinkedHashMap<>();
private DefaultDependencyArtifacts platform = new DefaultDependencyArtifacts();
@@ -193,7 +193,7 @@ public class GeneratePomsMojo extends AbstractMojo {
}
// find all candidate folders
- List<File> candidateDirs = new ArrayList<File>();
+ List<File> candidateDirs = new ArrayList<>();
for (File basedir : baseDirs) {
findAndAddCandidates(candidateDirs, basedir);
}
@@ -225,7 +225,7 @@ public class GeneratePomsMojo extends AbstractMojo {
}
}
- Set<File> projects = new LinkedHashSet<File>();
+ Set<File> projects = new LinkedHashSet<>();
// always add baseDir
projects.add(baseDirs.get(0));
@@ -350,7 +350,7 @@ public class GeneratePomsMojo extends AbstractMojo {
}
private List<File> getBaseDirs() {
- ArrayList<File> dirs = new ArrayList<File>();
+ ArrayList<File> dirs = new ArrayList<>();
dirs.add(baseDir);
if (extraDirs != null) {
dirs.addAll(toFileList(extraDirs));
@@ -359,7 +359,7 @@ public class GeneratePomsMojo extends AbstractMojo {
}
private List<File> toFileList(String str) {
- ArrayList<File> dirs = new ArrayList<File>();
+ ArrayList<File> dirs = new ArrayList<>();
if (str != null) {
StringTokenizer st = new StringTokenizer(str, ",");
while (st.hasMoreTokens()) {
@@ -490,7 +490,7 @@ public class GeneratePomsMojo extends AbstractMojo {
private Set<File> getSiteFeaturesAndPlugins(File basedir) throws MojoExecutionException {
try {
- Set<File> result = new LinkedHashSet<File>();
+ Set<File> result = new LinkedHashSet<>();
UpdateSite site;
File siteFile = new File(basedir, "site.xml");
@@ -520,7 +520,7 @@ public class GeneratePomsMojo extends AbstractMojo {
}
private File getModuleDir(String name) throws MojoExecutionException {
- ArrayList<File> moduleDirs = new ArrayList<File>();
+ ArrayList<File> moduleDirs = new ArrayList<>();
for (File basedir : getBaseDirs()) {
File dir = new File(basedir, name);
if (dir.exists() && dir.isDirectory() && isProjectDir(dir)) {
@@ -542,7 +542,7 @@ public class GeneratePomsMojo extends AbstractMojo {
private Set<File> getFeatureFeaturesAndPlugins(File basedir) throws MojoExecutionException {
try {
- Set<File> result = new LinkedHashSet<File>();
+ Set<File> result = new LinkedHashSet<>();
Feature feature = Feature.read(new File(basedir, "feature.xml"));
diff --git a/tycho-pomgenerator-plugin/src/test/java/org/eclipse/tycho/pomgenerator/test/GeneratePomsMojoTest.java b/tycho-pomgenerator-plugin/src/test/java/org/eclipse/tycho/pomgenerator/test/GeneratePomsMojoTest.java
index c407282b9..f1ff58cd3 100644
--- a/tycho-pomgenerator-plugin/src/test/java/org/eclipse/tycho/pomgenerator/test/GeneratePomsMojoTest.java
+++ b/tycho-pomgenerator-plugin/src/test/java/org/eclipse/tycho/pomgenerator/test/GeneratePomsMojoTest.java
@@ -93,7 +93,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testUpdateSite() throws Exception {
File baseDir = getBasedir("projects/simple/p003");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group-p003");
params.put("version", "1.0.0");
params.put("aggregator", Boolean.FALSE);
@@ -108,7 +108,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testRepository() throws Exception {
File baseDir = getBasedir("projects/simple/p006");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group-p006");
params.put("version", "1.0.0");
params.put("aggregator", Boolean.FALSE);
@@ -123,7 +123,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testMultibase_1_2() throws Exception {
File baseDir = getBasedir("projects/multibase");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group");
params.put("version", "1.0.0");
params.put("aggregator", Boolean.TRUE);
@@ -144,7 +144,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testRecursive() throws Exception {
File baseDir = getBasedir("projects/multibase");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group");
params.put("version", "1.0.0");
params.put("aggregator", Boolean.TRUE);
@@ -156,7 +156,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testParent() throws Exception {
File baseDir = getBasedir("projects/simple");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group");
params.put("version", "1.0.0");
params.put("aggregator", Boolean.TRUE);
@@ -196,7 +196,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testTests() throws Exception {
File baseDir = getBasedir("projects/tests");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group");
params.put("version", "1.0.0");
params.put("aggregator", Boolean.TRUE);
@@ -215,7 +215,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testRootProjects() throws Exception {
File baseDir = getBasedir("projects/rootprojects");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group");
params.put("version", "1.0.0");
params.put("aggregator", Boolean.TRUE);
@@ -232,7 +232,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testDeepModule() throws Exception {
File baseDir = getBasedir("projects/deepmodule");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group");
params.put("version", "1.0.0");
generate(baseDir, new File[] { new File(baseDir, "base") }, params);
@@ -245,7 +245,7 @@ public class GeneratePomsMojoTest extends AbstractTychoMojoTestCase {
public void testMalformedManifest() throws Exception {
File baseDir = getBasedir("projects/malformed");
- Map<String, Object> params = new HashMap<String, Object>();
+ Map<String, Object> params = new HashMap<>();
params.put("groupId", "group");
params.put("version", "1.0.0");
try {
diff --git a/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/AbstractSourceJarMojo.java b/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/AbstractSourceJarMojo.java
index 89987b47c..7c6664982 100644
--- a/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/AbstractSourceJarMojo.java
+++ b/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/AbstractSourceJarMojo.java
@@ -430,7 +430,7 @@ public abstract class AbstractSourceJarMojo extends AbstractMojo {
*/
private String[] getCombinedExcludes(List additionalExcludes) {
- ArrayList<String> combinedExcludes = new ArrayList<String>();
+ ArrayList<String> combinedExcludes = new ArrayList<>();
if (useDefaultExcludes) {
combinedExcludes.addAll(FileUtils.getDefaultExcludesAsList());
diff --git a/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/OsgiSourceMojo.java b/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/OsgiSourceMojo.java
index 6b2aadfb6..2dac27d2b 100644
--- a/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/OsgiSourceMojo.java
+++ b/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/OsgiSourceMojo.java
@@ -175,7 +175,7 @@ public class OsgiSourceMojo extends AbstractSourceJarMojo {
protected List<Resource> getSources(MavenProject p, boolean requireSourceRoots, BuildProperties buildProperties)
throws MojoExecutionException {
- List<Resource> resources = new ArrayList<Resource>();
+ List<Resource> resources = new ArrayList<>();
for (Map.Entry<String, List<String>> entry : buildProperties.getJarToSourceFolderMap().entrySet()) {
for (String sourceFolder : entry.getValue()) {
Resource resource = new Resource();
@@ -204,7 +204,7 @@ public class OsgiSourceMojo extends AbstractSourceJarMojo {
}
BuildProperties buildProperties = buildPropertiesParser.parse(p.getBasedir());
List<String> srcIncludesList = buildProperties.getSourceIncludes();
- List<Resource> resources = new ArrayList<Resource>();
+ List<Resource> resources = new ArrayList<>();
if (!srcIncludesList.isEmpty()) {
includeValidationHelper.checkSourceIncludesExist(p, buildProperties, strictSrcIncludes);
resources.add(createResource(project.getBasedir().getAbsolutePath(), srcIncludesList,

Back to the top