diff --git a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java index 2be77b2047..67b19ff030 100644 --- a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java +++ b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java @@ -161,7 +161,7 @@ public void generateRetrieveElementCall(Map entryInfos, IPath de String sourceRepository = (String) entryInfos.get(KEY_REPOSITORY); if (!iusToFetchBySource.containsKey(sourceRepository)) { - iusToFetchBySource.put(sourceRepository, new ArrayList()); + iusToFetchBySource.put(sourceRepository, new ArrayList<>()); } IUFetchInfo iuFetchInfo = new IUFetchInfo((String) entryInfos.get(KEY_ID), (String) entryInfos.get(KEY_VERSION)); diff --git a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java index 54eee3cbfd..43f846e24a 100644 --- a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java +++ b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java @@ -49,7 +49,7 @@ public class PackageConfigScriptGenerator extends AssembleConfigScriptGenerator public void initialize(String directoryName, String feature, Config configurationInformation, Collection elementList, Collection featureList, Collection allFeaturesList, Collection rootProviders) throws CoreException { /* package scripts require the root file providers for creating the file archive, but don't want them for other rootfile * stuff done by the assembly scripts, so keep them separate here */ - super.initialize(directoryName, feature, configurationInformation, elementList, featureList, allFeaturesList, new ArrayList(0)); + super.initialize(directoryName, feature, configurationInformation, elementList, featureList, allFeaturesList, new ArrayList<>(0)); if (rootProviders != null) { archiveRootProviders = rootProviders; } else { @@ -59,7 +59,7 @@ public void initialize(String directoryName, String feature, Config configuratio @Override protected Collection getArchiveRootFileProviders() { - if (archiveRootProviders.size() > 0) + if (!archiveRootProviders.isEmpty()) return archiveRootProviders; return super.getArchiveRootFileProviders(); }