Bug 533653 - Use Collection.isEmpty() instead of size() == 0

Change-Id: Iaed5777db781050f805c9adf84f200d2211ddd1a
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java
index 56d7fbb..632c2a9 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2016 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -332,7 +332,7 @@
 	 *         removed, or an empty array, never <code>null</code>
 	 */
 	public IDelta[] getBreakingChanges() {
-		if (this.breakingChanges == null || this.breakingChanges.size() == 0) {
+		if (this.breakingChanges == null || this.breakingChanges.isEmpty()) {
 			return EMPTY_DELTAS;
 		}
 		HashSet<IDelta> collector = new HashSet<>();
@@ -348,7 +348,7 @@
 	 *         removed, or an empty array, never <code>null</code>
 	 */
 	public IDelta[] getCompatibleChanges() {
-		if (this.compatibleChanges == null || this.compatibleChanges.size() == 0) {
+		if (this.compatibleChanges == null || this.compatibleChanges.isEmpty()) {
 			return EMPTY_DELTAS;
 		}
 		HashSet<IDelta> collector = new HashSet<>();
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java
index e01799e..a65f75b 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2017 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -147,7 +147,7 @@
 								Set<MethodKey> apiMembers = new HashSet<>();
 								gatherVisibleMethods(t2, apiMembers, modifiers);
 								methods.removeAll(apiMembers);
-								if (methods.size() == 0) {
+								if (methods.isEmpty()) {
 									// there are no visible methods left that
 									// are not part of an API type/interface
 									return false;
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
index 232978c..419fa61 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
@@ -795,7 +795,7 @@
 							}
 							catchLabelInfo.location.setLineNumber(currentLineNumber);
 						}
-						if (remaingEntriesTemp.size() == 0) {
+						if (remaingEntriesTemp.isEmpty()) {
 							remainingCatchLabelInfos = null;
 						} else {
 							remainingCatchLabelInfos = remaingEntriesTemp;
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TagValidator.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TagValidator.java
index 92ecea9..9faeef1 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TagValidator.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TagValidator.java
@@ -130,7 +130,7 @@
 	 * @param tags
 	 */
 	private void validateTags(ASTNode node, List<TagElement> tags) {
-		if (tags.size() == 0) {
+		if (tags.isEmpty()) {
 			return;
 		}
 		switch (node.getNodeType()) {
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java
index c26c950..e5b9ea5 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java
@@ -99,7 +99,7 @@
 
 	@Override
 	public IApiElement[] getApiElements() {
-		if (this.elements == null || this.elements.size() == 0) {
+		if (this.elements == null || this.elements.isEmpty()) {
 			return NO_ELEMENTS;
 		}
 		return this.elements.toArray(new IApiElement[this.elements.size()]);
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseReportConverter.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseReportConverter.java
index 8ac0eec..874d1a0 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseReportConverter.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseReportConverter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2017 IBM Corporation and others.
+ * Copyright (c) 2009, 2018 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
@@ -207,7 +207,7 @@
 
 		@Override
 		public void endVisitMember(IMemberDescriptor referencedMember) {
-			if (this.currentmember.children.size() == 0) {
+			if (this.currentmember.children.isEmpty()) {
 				TreeMap<IMemberDescriptor, Member> map = this.currentreport.children.get(this.currenttype);
 				map.remove(referencedMember);
 			}
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanReferences.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanReferences.java
index 14e45ab..0344d8b 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanReferences.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanReferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2013 IBM Corporation and others.
+ * Copyright (c) 2010, 2018 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
@@ -57,7 +57,7 @@
 		List<IReferenceDescriptor> referenceDescriptorList = new ArrayList<>();
 		for (String type : types) {
 			List<IReferenceDescriptor> refDescs = fReferencesMap.get(type);
-			if (refDescs == null || refDescs.size() == 0) {
+			if (refDescs == null || refDescs.isEmpty()) {
 				continue;
 			}
 			referenceDescriptorList.addAll(refDescs);
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
index 8b035a5..3e3feba 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
@@ -2564,7 +2564,7 @@
 						}
 					}
 				}
-				if (reexportedComponents == null || reexportedComponents.size() == 0) {
+				if (reexportedComponents == null || reexportedComponents.isEmpty()) {
 					return null;
 				}
 				return reexportedComponents.toArray(new IApiComponent[reexportedComponents.size()]);
diff --git a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java
index dd3360c..43b5a86 100644
--- a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java
+++ b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2015 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -171,7 +171,7 @@
 		}
 
 		public String[] getNonApiBundles() {
-			if (this.nonApiBundles == null || this.nonApiBundles.size() == 0) {
+			if (this.nonApiBundles == null || this.nonApiBundles.isEmpty()) {
 				return NO_NON_API_BUNDLES;
 			}
 			String[] nonApiBundlesNames = new String[this.nonApiBundles.size()];
diff --git a/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSComponent.java b/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSComponent.java
index 00e36da..45527a5 100644
--- a/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSComponent.java
+++ b/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSComponent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2015 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -117,7 +117,7 @@
 	@Override
 	public IDSImplementation getImplementation() {
 		ArrayList<IDocumentElementNode> childNodesList = getChildNodesList(IDSImplementation.class, true);
-		if (childNodesList.size() == 0) {
+		if (childNodesList.isEmpty()) {
 			return null;
 		}
 		return (IDSImplementation) childNodesList.get(0);
@@ -156,7 +156,7 @@
 	@Override
 	public IDSService getService() {
 		ArrayList<IDocumentElementNode> childNodesList = getChildNodesList(IDSService.class, true);
-		if (childNodesList.size() == 0) {
+		if (childNodesList.isEmpty()) {
 			return null;
 		}
 		return (IDSService) childNodesList.get(0);
diff --git a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpMarkerManager.java b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpMarkerManager.java
index 7efd7ad..a66b967 100644
--- a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpMarkerManager.java
+++ b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpMarkerManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************

- * Copyright (c) 2009, 2017 IBM Corporation and others.

+ * Copyright (c) 2009, 2018 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

@@ -44,7 +44,7 @@
 

 	public static void createMarkers(CtxHelpModel model) {

 		Collection<Exception> errors = model.getErrors();

-		if (errors == null || errors.size() == 0) {

+		if (errors == null || errors.isEmpty()) {

 			return;

 		}

 

diff --git a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocMarkerManager.java b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocMarkerManager.java
index 25dd52a..eb21d42 100644
--- a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocMarkerManager.java
+++ b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocMarkerManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************

- * Copyright (c) 2009, 2017 IBM Corporation and others.

+ * Copyright (c) 2009, 2018 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

@@ -47,7 +47,7 @@
 

 	public static void createMarkers(TocModel model) {

 		Collection<Exception> errors = model.getErrors();

-		if (errors == null || errors.size() == 0) {

+		if (errors == null || errors.isEmpty()) {

 			return;

 		}

 

diff --git a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSCommandManager.java b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSCommandManager.java
index e9525df..0cbf96a 100755
--- a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSCommandManager.java
+++ b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSCommandManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -106,7 +106,7 @@
 	private void fireNewCommandKeyEvent(String key, String value) {
 		// Do not fire the event if there are no listeners or we are blocking
 		// events
-		if ((fBlockEvents == true) || (fListeners == null) || (fListeners.size() == 0)) {
+		if ((fBlockEvents == true) || (fListeners == null) || (fListeners.isEmpty())) {
 			return;
 		}
 		// Create the event
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
index 5166166..bcabc6c 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -164,7 +164,7 @@
 		if (platformHome != null && platformHome.length() > 0) {
 			URL[] featureURLs = PluginPathFinder.getFeaturePaths(platformHome);
 
-			if (additionalLocations.size() == 0)
+			if (additionalLocations.isEmpty())
 				return createFeatures(featureURLs, monitor);
 
 			File[] dirs = new File[additionalLocations.size()];
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
index 3c7e77a..a2d17ec 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -208,7 +208,7 @@
 	 * @return URL location of the bundles.info or <code>null</code>
 	 */
 	public static URL writeBundlesTxt(Map<?, ?> bundles, int defaultStartLevel, boolean defaultAutoStart, File directory, String osgiBundleList) {
-		if (bundles.size() == 0) {
+		if (bundles.isEmpty()) {
 			return null;
 		}
 
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
index 1cb4aca..26895b5 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -436,7 +436,7 @@
 	 * 		<code>false</code> otherwise.
 	 */
 	public boolean isEmpty() {
-		return getEntryTable().size() == 0;
+		return getEntryTable().isEmpty();
 	}
 
 	/**
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java
index 9bea6bc..183215c 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2014 IBM Corporation and others.
+ *  Copyright (c) 2003, 2018 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
@@ -198,7 +198,7 @@
 		if (changedModels == null)
 			return;
 
-		if (changedModels.size() == 0) {
+		if (changedModels.isEmpty()) {
 			return;
 		}
 
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
index 8262613..2a0b3ef 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
@@ -865,7 +865,7 @@
 	}
 
 	private void validateSourceEntries(ArrayList<IBuildEntry> sourceEntries, IBuildEntry srcExcludes, IClasspathEntry[] cpes) {
-		if (sourceEntries == null || sourceEntries.size() == 0)
+		if (sourceEntries == null || sourceEntries.isEmpty())
 			return;
 		String[] unlisted = PDEBuilderHelper.getUnlistedClasspaths(sourceEntries, fProject, cpes);
 		List<String> excludeList = new ArrayList<>(0);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
index 1033fc0..7f35001 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2017 IBM Corporation and others.
+ * Copyright (c) 2009, 2018 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
@@ -408,7 +408,7 @@
 			ArrayList<SourceFolder> sourceFolders = outputFolder.getSourceFolders();
 			ArrayList<String> outputFolderLibs = new ArrayList<>(outputFolder.getLibs());
 
-			if (sourceFolders.size() == 0) {
+			if (sourceFolders.isEmpty()) {
 				if (!outputFolder.isLibrary()) {
 					// report error - invalid output folder
 					for (String libName : outputFolderLibs) {
@@ -421,7 +421,7 @@
 						prepareError(PROPERTY_OUTPUT_PREFIX + libName, outputFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fOututLibSeverity, CompilerFlags.P_BUILD_OUTPUT_LIBRARY,PDEMarkerFactory.CAT_OTHER);
 					}
 				} else {
-					if (outputFolderLibs.size() == 0) {
+					if (outputFolderLibs.isEmpty()) {
 						//class folder does not have an output.<library> entry, only continue if we have a plugin model for the project
 						IPluginModelBase model = PluginRegistry.findModel(fProject);
 						if (model != null) {
@@ -542,7 +542,7 @@
 					prepareError(PROPERTY_SOURCE_PREFIX + libName, sourceFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fSrcLibSeverity,CompilerFlags.P_BUILD_SOURCE_LIBRARY, PDEMarkerFactory.CAT_OTHER);
 				}
 			} else {
-				if (outputFolder.getLibs().size() == 0 && sourceFolder.getLibs().size() == 1) {
+				if (outputFolder.getLibs().isEmpty() && sourceFolder.getLibs().size() == 1) {
 					//error - missing output folder
 
 					String libName = sourceFolder.getLibs().get(0);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java
index 6005899..10b21eb 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2012 IBM Corporation and others.
+ *  Copyright (c) 2006, 2018 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
@@ -160,7 +160,7 @@
 
 	public void disconnect(Object consumer) {
 		fConsumers.remove(consumer);
-		if (fConsumers.size() == 0) {
+		if (fConsumers.isEmpty()) {
 			dispose();
 		}
 	}
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/AbstractKeyValueTextChangeListener.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/AbstractKeyValueTextChangeListener.java
index e02cda0..573cc80 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/AbstractKeyValueTextChangeListener.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/AbstractKeyValueTextChangeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2012 IBM Corporation and others.
+ *  Copyright (c) 2005, 2018 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
@@ -11,13 +11,9 @@
 package org.eclipse.pde.internal.core.text;
 
 import java.util.HashMap;
-
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.internal.core.util.PropertiesUtil;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
+import org.eclipse.text.edits.*;
 
 public abstract class AbstractKeyValueTextChangeListener extends AbstractTextChangeListener {
 
@@ -31,7 +27,7 @@
 
 	@Override
 	public TextEdit[] getTextOperations() {
-		if (fOperationTable.size() == 0)
+		if (fOperationTable.isEmpty())
 			return new TextEdit[0];
 		return fOperationTable.values().toArray(new TextEdit[fOperationTable.size()]);
 	}
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/CompositeManifestHeader.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/CompositeManifestHeader.java
index 848bd27..47494fc 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/CompositeManifestHeader.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/CompositeManifestHeader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2017 IBM Corporation and others.
+ *  Copyright (c) 2005, 2018 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
@@ -161,8 +161,8 @@
 
 	public boolean isEmpty() {
 		if (fSort)
-			return fElementMap == null || fElementMap.size() == 0;
-		return fManifestElements == null || fManifestElements.size() == 0;
+			return fElementMap == null || fElementMap.isEmpty();
+		return fManifestElements == null || fManifestElements.isEmpty();
 	}
 
 	public boolean hasElement(String name) {
@@ -334,7 +334,7 @@
 			return null;
 		} else if (fManifestElements == null) {
 			return null;
-		} else if (fManifestElements.size() == 0) {
+		} else if (fManifestElements.isEmpty()) {
 			return null;
 		}
 		// Remove the element
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageObject.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageObject.java
index bb34f2b..55a8f2d 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageObject.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2017 IBM Corporation and others.
+ *  Copyright (c) 2005, 2018 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
@@ -68,7 +68,7 @@
 			setDirective(ICoreConstants.INTERNAL_DIRECTIVE, null);
 			setDirective(ICoreConstants.FRIENDS_DIRECTIVE, null);
 		} else {
-			if (fFriends.size() == 0)
+			if (fFriends.isEmpty())
 				setDirective(ICoreConstants.INTERNAL_DIRECTIVE, "true"); //$NON-NLS-1$
 			else {
 				Iterator<String> iter = fFriends.keySet().iterator();
@@ -98,7 +98,7 @@
 		boolean hasInternalChanged = false;
 		fFriends.remove(friend.getName());
 		setDirective(ICoreConstants.FRIENDS_DIRECTIVE, null);
-		if (fFriends.size() == 0) {
+		if (fFriends.isEmpty()) {
 			setDirective(ICoreConstants.INTERNAL_DIRECTIVE, "true"); //$NON-NLS-1$
 			hasInternalChanged = true;
 		} else {
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/plugin/XMLTextChangeListener.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/plugin/XMLTextChangeListener.java
index 82f7b8c..5d9c850 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/plugin/XMLTextChangeListener.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/plugin/XMLTextChangeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2017 IBM Corporation and others.
+ *  Copyright (c) 2005, 2018 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
@@ -39,7 +39,7 @@
 
 	@Override
 	public TextEdit[] getTextOperations() {
-		if (fOperationList.size() == 0)
+		if (fOperationList.isEmpty())
 			return new TextEdit[0];
 		return fOperationList.toArray(new TextEdit[fOperationList.size()]);
 	}
diff --git a/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/autocomplete/processors/AttributeValueCompletionProcessor.java b/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/autocomplete/processors/AttributeValueCompletionProcessor.java
index 3667963..556141f 100644
--- a/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/autocomplete/processors/AttributeValueCompletionProcessor.java
+++ b/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/autocomplete/processors/AttributeValueCompletionProcessor.java
@@ -53,7 +53,7 @@
 		if (rootNode == null)
 			return new ICompletionProposal[] {};
 		List<Node> locationsNode = rootNode.getChildNodesByTag(ITargetConstants.LOCATIONS_TAG);
-		if (locationsNode == null || locationsNode.size() == 0)
+		if (locationsNode == null || locationsNode.isEmpty())
 			return new ICompletionProposal[] {};
 		Node locationNode = null;
 		for (Node u : locationsNode.get(0).getChildNodesByTag(ITargetConstants.LOCATION_TAG)) {
diff --git a/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/command/UpdateUnitVersions.java b/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/command/UpdateUnitVersions.java
index 19b39b2..f4dc142 100644
--- a/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/command/UpdateUnitVersions.java
+++ b/ui/org.eclipse.pde.genericeditor.extension/src/org/eclipse/pde/internal/genericeditor/target/extension/command/UpdateUnitVersions.java
@@ -61,7 +61,7 @@
 			if (rootNode == null)
 				return null;
 			List<Node> locationsNode = rootNode.getChildNodesByTag(ITargetConstants.LOCATIONS_TAG);
-			if (locationsNode == null || locationsNode.size() == 0)
+			if (locationsNode == null || locationsNode.isEmpty())
 				return null;
 
 			int offsetChange = 0;
@@ -91,7 +91,7 @@
 							break;
 						}
 					}
-					if (versions == null || versions.size() == 0) {
+					if (versions == null || versions.isEmpty()) {
 						continue;
 					}
 					Collections.sort(versions, (v1, v2) -> (new Version(v2)).compareTo(new Version(v1)));
diff --git a/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchListener.java b/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchListener.java
index b68b3cb..42bd6b2 100644
--- a/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchListener.java
+++ b/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -26,30 +26,21 @@
 	}
 
 	public void manage(ILaunch launch) {
-		if (managedLaunches.size() == 0)
+		if (managedLaunches.isEmpty())
 			hookListener(true);
 		if (!managedLaunches.contains(launch))
 			managedLaunches.add(launch);
 	}
 
-	/**
-	 * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch)
-	 */
 	@Override
 	public void launchRemoved(ILaunch launch) {
 		update(launch, true);
 	}
 
-	/**
-	 * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch)
-	 */
 	@Override
 	public void launchAdded(ILaunch launch) {
 	}
 
-	/**
-	 * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch)
-	 */
 	@Override
 	public void launchChanged(ILaunch launch) {
 	}
@@ -58,7 +49,7 @@
 		if (managedLaunches.contains(launch)) {
 			if (remove || launch.isTerminated()) {
 				managedLaunches.remove(launch);
-				if (managedLaunches.size() == 0) {
+				if (managedLaunches.isEmpty()) {
 					hookListener(false);
 				}
 			}
@@ -104,9 +95,6 @@
 		hookListener(false);
 	}
 
-	/**
-	 * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent)
-	 */
 	@Override
 	public void handleDebugEvents(DebugEvent[] events) {
 		for (DebugEvent event : events) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java
index 1b01ac1..2c23191 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
+ * Copyright (c) 2003, 2018 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
@@ -149,13 +149,13 @@
 
 	public static void setDefaultValues(IFile generatedFile) {
 		try {
-			List<?> configs = AntLaunchShortcut.findExistingLaunchConfigurations(generatedFile);
+			List<ILaunchConfiguration> configs = AntLaunchShortcut.findExistingLaunchConfigurations(generatedFile);
 			ILaunchConfigurationWorkingCopy launchCopy;
-			if (configs.size() == 0) {
+			if (configs.isEmpty()) {
 				ILaunchConfiguration config = AntLaunchShortcut.createDefaultLaunchConfiguration(generatedFile);
 				launchCopy = config.getWorkingCopy();
 			} else {
-				launchCopy = ((ILaunchConfiguration) configs.get(0)).getWorkingCopy();
+				launchCopy = configs.get(0).getWorkingCopy();
 			}
 			if (launchCopy == null)
 				return;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditor.java
index a3656ba..9e8e0bd 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2015 IBM Corporation and others.
+ *  Copyright (c) 2000, 2018 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
@@ -774,7 +774,7 @@
 		String textVersion = null;
 		if (selection instanceof IStructuredSelection) {
 			IStructuredSelection ssel = (IStructuredSelection) selection;
-			if (ssel.size() == 0)
+			if (ssel.isEmpty())
 				return;
 			objects = ssel.toArray();
 			StringWriter writer = new StringWriter();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java
index b4dc8c2..b6869a8 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2016 IBM Corporation and others.
+ *  Copyright (c) 2000, 2018 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
@@ -55,9 +55,6 @@
 			return new Object[0];
 		}
 
-		/**
-		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
-		 */
 		@Override
 		public Object[] getChildren(Object parent) {
 			try {
@@ -88,9 +85,6 @@
 			return new Object[0];
 		}
 
-		/**
-		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
-		 */
 		@Override
 		public Object getParent(Object element) {
 			if (element != null && element instanceof IResource) {
@@ -99,9 +93,6 @@
 			return null;
 		}
 
-		/**
-		 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
-		 */
 		@Override
 		public boolean hasChildren(Object element) {
 			if (element instanceof IFolder)
@@ -289,7 +280,7 @@
 					}
 				}
 			}
-			if (fileExt.size() == 0)
+			if (fileExt.isEmpty())
 				return;
 			try {
 				IResource[] members = fBundleRoot.members();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java
index e5572ce..f44534c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2015 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 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
@@ -274,7 +274,7 @@
 		// Get all the applicable extension points
 		ArrayList<ISchemaObject> allExtensionPoints = getAllExtensionPoints(F_EXTENSION_ATTRIBUTE_POINT_VALUE);
 		// Ensure we found extension points
-		if ((allExtensionPoints == null) || (allExtensionPoints.size() == 0)) {
+		if ((allExtensionPoints == null) || (allExtensionPoints.isEmpty())) {
 			return null;
 		}
 		// If there is no current attribute value, then the applicable extension
@@ -301,7 +301,7 @@
 		// Get all avaliable extensions with point attribute values
 		ArrayList<ISchemaObject> allExtensionPoints = getAllExtensionPoints(F_EXTENSION_POINT_AND_VALUE);
 		// Ensure we found extension points
-		if ((allExtensionPoints == null) || (allExtensionPoints.size() == 0)) {
+		if ((allExtensionPoints == null) || (allExtensionPoints.isEmpty())) {
 			// Return the current proposal list without extension points
 			return convertListToProposal(filteredProposalList, node, offset);
 		}
@@ -727,7 +727,7 @@
 	 */
 	private void updateExternalExtPointTypes(int newVType) {
 		// Ensure we have proposals
-		if (fExternalExtPoints.size() == 0) {
+		if (fExternalExtPoints.isEmpty()) {
 			return;
 		}
 		// Get the first proposal
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
index 5eef5b5..5ef64e4 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2017 IBM Corporation and others.
+ *  Copyright (c) 2000, 2018 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
@@ -408,7 +408,7 @@
 					for (IClasspathEntry cpe : entries)
 						if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE)
 							tokens.add(cpe.getPath().removeFirstSegments(1).addTrailingSeparator().toString());
-					if (tokens.size() == 0)
+					if (tokens.isEmpty())
 						return;
 
 					entry = bmodel.getFactory().createEntry(PROPERTY_SOURCE_PREFIX + newPath);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIdentifierAttributeDetails.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIdentifierAttributeDetails.java
index f1896da..c6f1f0c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIdentifierAttributeDetails.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIdentifierAttributeDetails.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2015 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -176,7 +176,7 @@
 				}
 				res.setChildren(vres);
 				if (type instanceof SchemaSimpleType) {
-					if (vres.size() == 0)
+					if (vres.isEmpty())
 						((SchemaSimpleType) type).setRestriction(null);
 					else
 						((SchemaSimpleType) type).setRestriction(res);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaStringAttributeDetails.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaStringAttributeDetails.java
index 6572d29..7495b88 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaStringAttributeDetails.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaStringAttributeDetails.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2015 IBM Corporation and others.
+ *  Copyright (c) 2007, 2018 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
@@ -160,7 +160,7 @@
 				}
 				res.setChildren(vres);
 				if (type instanceof SchemaSimpleType) {
-					if (vres.size() == 0)
+					if (vres.isEmpty())
 						((SchemaSimpleType) type).setRestriction(null);
 					else
 						((SchemaSimpleType) type).setRestriction(res);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/elements/ElementList.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/elements/ElementList.java
index 0681a26..48dc138 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/elements/ElementList.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/elements/ElementList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2015 IBM Corporation and others.
+ *  Copyright (c) 2000, 2018 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
@@ -34,7 +34,7 @@
 
 	@Override
 	public Object[] getChildren() {
-		if (children.size() == 0)
+		if (children.isEmpty())
 			return new Object[0];
 		Object[] result = new Object[children.size()];
 		children.copyInto(result);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java
index 01f8675..9f9efca 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java
@@ -214,7 +214,7 @@
 					featureModels.add(model.getModel(true));
 				}
 			}
-			if (featureModels.size() == 0) {
+			if (featureModels.isEmpty()) {
 				MessageDialog.openWarning(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.FeatureSelectionDialog_title, PDEUIMessages.FeatureBlock_AllFeatureSelected);
 				return;
 			}
@@ -253,7 +253,7 @@
 			fTree.remove(selection.toArray());
 			List<?> input = (List<?>) fTree.getInput();
 			input.removeAll(selection.toList());
-			if (fAdditionalPlugins.size() == 0) {
+			if (fAdditionalPlugins.isEmpty()) {
 				fTree.remove(fAdditionalPluginsParentElement);
 				input.remove(fAdditionalPluginsParentElement);
 				fRemovePluginButton.setEnabled(false);
@@ -947,7 +947,7 @@
 							input.remove(element);
 						}
 					}
-					if (fAdditionalPlugins.size() == 0) {
+					if (fAdditionalPlugins.isEmpty()) {
 						fTree.remove(fAdditionalPluginsParentElement);
 						input.remove(fAdditionalPluginsParentElement);
 						fRemovePluginButton.setEnabled(false);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java
index e9b883c..5a0d39c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2012 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -98,6 +98,6 @@
 	 * @return whether or not the list of models is empty
 	 */
 	public boolean isEmpty() {
-		return fModels.size() == 0;
+		return fModels.isEmpty();
 	}
 }
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChangeTable.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChangeTable.java
index 75217e6..fce6e74 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChangeTable.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChangeTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2012 IBM Corporation and others.
+ *  Copyright (c) 2005, 2018 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
@@ -53,6 +53,6 @@
 	}
 
 	public boolean isEmpty() {
-		return fChangeTable.size() == 0;
+		return fChangeTable.isEmpty();
 	}
 }
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ExtensionsPatternFilter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ExtensionsPatternFilter.java
index 455422c..1b52c7e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ExtensionsPatternFilter.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ExtensionsPatternFilter.java
@@ -214,7 +214,7 @@
 	@Override
 	public Object[] filter(Viewer viewer, Object parent, Object[] elements) {
 		if (parent != null && parent instanceof BundlePlugin) {
-			if (fFoundAnyElementsCache.size() == 0 && fSearchPattern != null && fSearchPattern.length() > 0) {
+			if (fFoundAnyElementsCache.isEmpty() && fSearchPattern != null && fSearchPattern.length() > 0) {
 				BundlePlugin pluginPlugin = (BundlePlugin) parent;
 				doFilter(viewer, pluginPlugin, pluginPlugin.getExtensions(), false);
 			}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java
index 1924c50..8e23545 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java
@@ -209,7 +209,7 @@
 				containers.add(getTargetPlatformService().newFeatureLocation(location.getPath(), ((IFeatureModel) element).getFeature().getId(), version));
 			}
 		}
-		if (containers.size() == 0) {
+		if (containers.isEmpty()) {
 			return null;
 		}
 		return containers.toArray(new ITargetLocation[containers.size()]);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
index 60fd8b9..e131963 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
@@ -1087,9 +1087,10 @@
 				}
 			}
 
-			if (included.size() == 0) {
+			if (included.isEmpty()) {
 				fTargetDefinition.setIncluded(new NameVersionDescriptor[0]);
-			} else if (included.size() == 0 || included.size() - missingCount == fTargetDefinition.getAllFeatures().length + fTargetDefinition.getOtherBundles().length) {
+			} else if (included.isEmpty() || included.size() - missingCount == fTargetDefinition.getAllFeatures().length
+					+ fTargetDefinition.getOtherBundles().length) {
 				fTargetDefinition.setIncluded(null);
 			} else {
 				fTargetDefinition.setIncluded(included.toArray(new NameVersionDescriptor[included.size()]));
@@ -1125,7 +1126,7 @@
 				}
 			}
 
-			if (included.size() == 0) {
+			if (included.isEmpty()) {
 				fTargetDefinition.setIncluded(new NameVersionDescriptor[0]);
 			} else if (included.size() == fAllBundles.size() + fMissing.size()) {
 				fTargetDefinition.setIncluded(null);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ExtensionsFilterUtil.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ExtensionsFilterUtil.java
index 86ca6c0..307d245 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ExtensionsFilterUtil.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ExtensionsFilterUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012 IBM Corporation and others.
+ * Copyright (c) 2012, 2018 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
@@ -145,7 +145,7 @@
 			if (treeElement instanceof IPluginElement) {
 				IPluginElement pluginElement = (IPluginElement) treeElement;
 				Set<String> customAttributes = getCustomRelations(pluginElement);
-				if (customAttributes.size() == 0) {
+				if (customAttributes.isEmpty()) {
 					for (String property : RELATED_ATTRIBUTES) {
 						IPluginAttribute attribute = pluginElement.getAttribute(property);
 						if (attribute != null && attribute.getValue() != null && attribute.getValue().length() > 0) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
index 56ffe8f..1672b50 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2018 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
@@ -108,7 +108,7 @@
 			return;
 		ArrayList<?> list = fOpenPDEEditors.get(project);
 		list.remove(editor);
-		if (list.size() == 0)
+		if (list.isEmpty())
 			fOpenPDEEditors.remove(project);
 	}
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/SharedLabelProvider.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/SharedLabelProvider.java
index 12e1541..c1810ec 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/SharedLabelProvider.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/SharedLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2015 IBM Corporation and others.
+ *  Copyright (c) 2000, 2018 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
@@ -52,14 +52,14 @@
 
 	public void disconnect(Object consumer) {
 		consumers.remove(consumer);
-		if (consumers.size() == 0) {
+		if (consumers.isEmpty()) {
 			dispose();
 		}
 	}
 
 	@Override
 	public void dispose() {
-		if (consumers.size() == 0) {
+		if (consumers.isEmpty()) {
 			for (Enumeration<Image> elements = images.elements(); elements.hasMoreElements();) {
 				elements.nextElement().dispose();
 			}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java
index 84ce0c8..803ae46 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2016 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 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
@@ -110,7 +110,7 @@
 
 	private void handleJavaSearch(final boolean add) {
 		IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
-		if (selection.size() == 0)
+		if (selection.isEmpty())
 			return;
 
 		ArrayList<IPluginModelBase> result = new ArrayList<>();
@@ -121,7 +121,7 @@
 				result.add(model);
 			}
 		}
-		if (result.size() == 0)
+		if (result.isEmpty())
 			return;
 		final IPluginModelBase[] array = result.toArray(new IPluginModelBase[result.size()]);
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java
index e7e501c..b384b8d 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java
@@ -616,7 +616,7 @@
 
 	private void handleSelectDependencies() {
 		IStructuredSelection selection = fTreeViewer.getStructuredSelection();
-		if (selection.size() == 0)
+		if (selection.isEmpty())
 			return;
 
 		IPluginModelBase[] models = new IPluginModelBase[selection.size()];
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java
index ccbf85c..76bf366 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java
@@ -255,7 +255,7 @@
 				if (curr != null && !items.contains(curr))
 					items.add(curr);
 			}
-			if (items.size() == 0)
+			if (items.isEmpty())
 				items.add(""); //$NON-NLS-1$
 			dropItems = items.toArray(new String[items.size()]);
 		}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java
index 8702cb0..4e0171d 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -300,7 +300,7 @@
 			}
 			String symbolicName = model.getBundleDescription().getSymbolicName();
 			ArrayList<IPluginModelBase> plugins = workspacePluginMap.get(symbolicName);
-			if (plugins == null || plugins.size() == 0) {
+			if (plugins == null || plugins.isEmpty()) {
 				continue;
 			}
 			if (!conflictingPlugins.containsAll(plugins)) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java
index e31de3c..c09b6f3 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2016 IBM Corporation and others.
+ * Copyright (c) 2003, 2018 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
@@ -504,7 +504,7 @@
 	}
 
 	private void handleSetImportSelection(ArrayList<Object> newSelectionList) {
-		if (newSelectionList.size() == 0) {
+		if (newSelectionList.isEmpty()) {
 			handleRemoveAll();
 			pageChanged();
 			return;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationUpdateRefPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationUpdateRefPage.java
index 7e89fe0..3fd4a93 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationUpdateRefPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationUpdateRefPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2016 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -73,7 +73,7 @@
 	}
 
 	private void computeSelected(Collection<?> initialSelection) {
-		if (initialSelection == null || initialSelection.size() == 0)
+		if (initialSelection == null || initialSelection.isEmpty())
 			return;
 		Set<IPluginModelBase> selected = new HashSet<>();
 		Iterator<?> iter = initialSelection.iterator();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/RemoveSplashHandlerBindingAction.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/RemoveSplashHandlerBindingAction.java
index 3c48ad8..ae79683 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/RemoveSplashHandlerBindingAction.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/RemoveSplashHandlerBindingAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2015 IBM Corporation and others.
+ *  Copyright (c) 2007, 2018 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
@@ -162,7 +162,7 @@
 			}
 		}
 		// No product binding elements found
-		if (elements.size() == 0) {
+		if (elements.isEmpty()) {
 			return null;
 		}
 		// Return product binding elements
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java
index 853f0c4..84f3e35 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2015 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -38,17 +38,11 @@
 		super();
 	}
 
-	/**
-	 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
-	 */
 	@Override
 	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
 		workbench = targetPart.getSite().getWorkbenchWindow().getWorkbench();
 	}
 
-	/**
-	 * @see IActionDelegate#run(IAction)
-	 */
 	@Override
 	public void run(IAction action) {
 		Map<Manifest, Object> filesMap = new HashMap<>();
@@ -93,15 +87,12 @@
 		dialog.open();
 	}
 
-	/**
-	 * @see IActionDelegate#selectionChanged(IAction, ISelection)
-	 */
 	@Override
 	public void selectionChanged(IAction action, ISelection s) {
 		boolean enabled = true;
 		if (s instanceof IStructuredSelection) {
 			selection = (IStructuredSelection) s;
-			if (selection.size() == 0)
+			if (selection.isEmpty())
 				return;
 			Iterator<?> i = selection.iterator();
 			while (i.hasNext()) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java
index 1f75623..c3e3233 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2018 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
@@ -220,7 +220,7 @@
 				for (int i = 0; i < usedkeys.size(); i++)
 					allKeys.remove(usedkeys.get(i));
 
-				if (allKeys.size() == 0)
+				if (allKeys.isEmpty())
 					return;
 
 				// scan properties file for keys referencing other keys
@@ -239,7 +239,7 @@
 						String akey = '%' + allKeys.get(j) + '%';
 						if (entry.indexOf(akey) != -1)
 							allKeys.remove(allKeys.get(j--));
-						if (allKeys.size() == 0)
+						if (allKeys.isEmpty())
 							return;
 					}
 				}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateSection.java
index 05be104..72c8c3e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2015 IBM Corporation and others.
+ *  Copyright (c) 2000, 2018 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
@@ -315,7 +315,7 @@
 	 * the page complete, thereby allowing users to flip to the next page.
 	 */
 	protected void resetPageState() {
-		if (pages.size() == 0)
+		if (pages.isEmpty())
 			return;
 		WizardPage firstPage = pages.get(0).page;
 		IWizardContainer container = firstPage.getWizard().getContainer();
diff --git a/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java b/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
index 0dbfa36..01f9fdd 100644
--- a/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
+++ b/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
@@ -150,7 +150,7 @@
 			}
 		} catch (IOException e) { // do nothing
 		} finally {
-			if (file.length() > maxLogTailSizeInMegaByte && entries.size() == 0) {
+			if (file.length() > maxLogTailSizeInMegaByte && entries.isEmpty()) {
 				LogEntry entry = new LogEntry(new Status(IStatus.WARNING, Activator.PLUGIN_ID, NLS.bind(
 						Messages.LogReader_warn_noEntryWithinMaxLogTailSize, Long.valueOf(maxLogTailSizeInMegaByte))));
 				entry.setSession(currentSession == null ? new LogSession() : currentSession);
diff --git a/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java b/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
index 6eb041f..2fb0378 100644
--- a/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
+++ b/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
@@ -288,7 +288,7 @@
 		IMenuListener listener = manager -> {
 			manager.add(fCopyAction);
 			manager.add(new Separator(LOG_ENTRY_GROUP));
-			clearAction.setEnabled(!(elements.size() == 0 && groups.size() == 0));
+			clearAction.setEnabled(!(elements.isEmpty() && groups.isEmpty()));
 			manager.add(clearAction);
 			manager.add(fDeleteLogAction);
 			manager.add(fOpenLogAction);
diff --git a/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java b/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java
index 33f80ea..0a74eb6 100644
--- a/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java
+++ b/ui/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -48,7 +48,7 @@
 
 	@Override
 	public void dispose() {
-		if (consumers.size() == 0) {
+		if (consumers.isEmpty()) {
 			super.dispose();
 		}
 	}
@@ -121,7 +121,7 @@
 
 	public void disconnect(Object consumer) {
 		consumers.remove(consumer);
-		if (consumers.size() == 0) {
+		if (consumers.isEmpty()) {
 			dispose();
 		}
 	}