Bug 527125 - Fix unnecessary else clause warnings in workbench bundle

Change-Id: Ie7e49b463dd0ddf6d8b8645732e9f8be93d51cbb
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI Editor Support/org/eclipse/ui/internal/editorsupport/ComponentSupport.java b/bundles/org.eclipse.ui.workbench/Eclipse UI Editor Support/org/eclipse/ui/internal/editorsupport/ComponentSupport.java
index 85cfa17..34e4934 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI Editor Support/org/eclipse/ui/internal/editorsupport/ComponentSupport.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI Editor Support/org/eclipse/ui/internal/editorsupport/ComponentSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -12,7 +12,6 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.util.Util;
 import org.eclipse.ui.IEditorPart;
@@ -60,9 +59,8 @@
     public static boolean inPlaceEditorAvailable(String filename) {
         if (inPlaceEditorSupported()) {
             return testForOleEditor(filename);
-        } else {
-            return false;
         }
+		return false;
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/SelectionProviderAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/SelectionProviderAction.java
index 5ef4791..5116021 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/SelectionProviderAction.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/SelectionProviderAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -97,9 +97,8 @@
         ISelection selection = provider.getSelection();
         if (selection instanceof IStructuredSelection) {
 			return (IStructuredSelection) selection;
-		} else {
-			return new StructuredSelection();
 		}
+		return new StructuredSelection();
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FileSystemElement.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FileSystemElement.java
index b0afcc0..f2df05d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FileSystemElement.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FileSystemElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -84,11 +84,9 @@
             if (isDirectory()) {
                 return WorkbenchImages
                         .getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
-            } else {
-                return WorkbenchPlugin.getDefault().getEditorRegistry()
-                        .getImageDescriptor(name);
-				//TODO: what are the implications for content types?  Should I guess?
             }
+			return WorkbenchPlugin.getDefault().getEditorRegistry().getImageDescriptor(name);
+			// TODO: what are the implications for content types? Should I guess?
         }
     };
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractSelectionService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractSelectionService.java
index 08471cb..58d6c14 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractSelectionService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractSelectionService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -183,14 +183,10 @@
 	public ISelection getSelection() {
         if (activeProvider != null) {
 			return activeProvider.getSelection();
-		} else {
-			return null;
 		}
+		return null;
     }
 
-    /*
-     * @see ISelectionService#getSelection(String)
-     */
     @Override
 	public ISelection getSelection(String partId) {
         return getPerPartTracker(partId).getSelection();
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java
index 82bd528..51bdef5 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -63,9 +63,8 @@
 					.getAction() instanceof RetargetAction))
 					|| enabledAllowed) {
 				return null;
-			} else {
-				return Boolean.FALSE;
 			}
+			return Boolean.FALSE;
 		}
 
 		@Override
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java
index b2e8c2a..cf09ba4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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,9 +57,8 @@
                     .getAction() instanceof RetargetAction))
                     || enabledAllowed) {
 				return null;
-			} else {
-				return Boolean.FALSE;
 			}
+			return Boolean.FALSE;
         }
 
         @Override
@@ -67,10 +66,9 @@
             if (getEnabled(item) == null) {
 				return getParentMenuManager().getOverrides().getAccelerator(
                         item);
-			} else {
-				// no acclerator if the item is disabled
-				return Integer.valueOf(0);
 			}
+			// no acclerator if the item is disabled
+			return Integer.valueOf(0);
         }
 
         @Override
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorPluginAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorPluginAction.java
index 51ae2d3..72871b8 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorPluginAction.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorPluginAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -40,10 +40,8 @@
             throws WorkbenchException {
         if (obj instanceof IEditorActionDelegate) {
 			return (IEditorActionDelegate) obj;
-		} else {
-			throw new WorkbenchException(
-                    "Action must implement IEditorActionDelegate"); //$NON-NLS-1$
 		}
+		throw new WorkbenchException("Action must implement IEditorActionDelegate"); //$NON-NLS-1$
     }
 
     @Override
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryEntry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryEntry.java
index ce60184..7b78b00 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryEntry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistoryEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -12,7 +12,6 @@
 package org.eclipse.ui.internal;
 
 import java.util.ArrayList;
-
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.INavigationLocation;
@@ -103,9 +102,8 @@
                 historyText = text;
             }
             return text;
-        } else {
-            return historyText;
         }
+		return historyText;
     }
 
     /**
@@ -177,9 +175,8 @@
                     currentEntry.location = location;
                     location = null;
                     return true;
-                } else {
-                    return location.mergeInto(currentEntry.location);
                 }
+				return location.mergeInto(currentEntry.location);
             } else if (currentEntry.location == null) {
                 return true;
             }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPluginAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPluginAction.java
index 15ab13f..7cc04d9 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPluginAction.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPluginAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -43,10 +43,8 @@
             throws WorkbenchException {
         if (obj instanceof IViewActionDelegate) {
 			return (IViewActionDelegate) obj;
-		} else {
-			throw new WorkbenchException(
-                    "Action must implement IViewActionDelegate"); //$NON-NLS-1$
 		}
+		throw new WorkbenchException("Action must implement IViewActionDelegate"); //$NON-NLS-1$
     }
 
     @Override
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/CompatibilityDragTarget.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/CompatibilityDragTarget.java
index 5dfd316..5c13280 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/CompatibilityDragTarget.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/CompatibilityDragTarget.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2017 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
@@ -51,9 +51,8 @@
                 e.y - (vmargin * 2));
         if (inner.contains(p)) {
             return SWT.CENTER;
-        } else {
-            return Geometry.getClosestSide(inner, p);
         }
+		return Geometry.getClosestSide(inner, p);
     }
 
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java
index 24d46e2..4d07cac 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -13,7 +13,6 @@
 
 import java.util.Collections;
 import java.util.Map;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IStatus;
@@ -99,9 +98,8 @@
 	public Map getAttributeValuesByName() {
 		if (loadHandler()) {
 			return handler.getAttributeValuesByName();
-		} else {
-			return Collections.EMPTY_MAP;
 		}
+		return Collections.EMPTY_MAP;
 	}
 
 	/**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractModifierKeyComparator.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractModifierKeyComparator.java
index 23465c4..5a63caa 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractModifierKeyComparator.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractModifierKeyComparator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2014 IBM Corporation and others.
+ * Copyright (c) 2003, 2017 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,7 +11,6 @@
 package org.eclipse.ui.internal.keys;
 
 import java.util.Comparator;
-
 import org.eclipse.ui.keys.ModifierKey;
 
 abstract class AbstractModifierKeyComparator implements Comparator {
@@ -25,9 +24,8 @@
 
         if (modifierKeyLeftRank != modifierKeyRightRank) {
 			return modifierKeyLeftRank - modifierKeyRightRank;
-		} else {
-			return modifierKeyLeft.compareTo(modifierKeyRight);
 		}
+		return modifierKeyLeft.compareTo(modifierKeyRight);
     }
 
     protected abstract int rank(ModifierKey modifierKey);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java
index 64ff46c..f9ea889 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -14,7 +14,6 @@
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.ResourceBundle;
-
 import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.keys.CharacterKey;
 import org.eclipse.ui.keys.Key;
@@ -115,10 +114,8 @@
             return Util.translateString(RESOURCE_BUNDLE,
                     CARBON_KEY_DELIMITER_KEY, Util.ZERO_LENGTH_STRING, false,
                     false);
-        } else {
-            return Util.translateString(RESOURCE_BUNDLE, KEY_DELIMITER_KEY,
-                    KeyStroke.KEY_DELIMITER, false, false);
         }
+		return Util.translateString(RESOURCE_BUNDLE, KEY_DELIMITER_KEY, KeyStroke.KEY_DELIMITER, false, false);
     }
 
     @Override
@@ -128,11 +125,9 @@
             return Util.translateString(RESOURCE_BUNDLE,
                     WIN32_KEY_STROKE_DELIMITER_KEY,
                     KeySequence.KEY_STROKE_DELIMITER, false, false);
-        } else {
-            return Util.translateString(RESOURCE_BUNDLE,
-                    KEY_STROKE_DELIMITER_KEY, KeySequence.KEY_STROKE_DELIMITER,
-                    false, false);
         }
+		return Util.translateString(RESOURCE_BUNDLE, KEY_STROKE_DELIMITER_KEY, KeySequence.KEY_STROKE_DELIMITER, false,
+				false);
     }
 
     @Override
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeModifierKeyComparator.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeModifierKeyComparator.java
index 4156a7d..ada09c4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeModifierKeyComparator.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeModifierKeyComparator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -12,7 +12,6 @@
 package org.eclipse.ui.internal.keys;
 
 import java.util.Comparator;
-
 import org.eclipse.jface.util.Util;
 import org.eclipse.ui.keys.ModifierKey;
 
@@ -39,9 +38,8 @@
 
         if (modifierKeyLeftRank != modifierKeyRightRank) {
             return modifierKeyLeftRank - modifierKeyRightRank;
-        } else {
-            return modifierKeyLeft.compareTo(modifierKeyRight);
         }
+		return modifierKeyLeft.compareTo(modifierKeyRight);
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CellLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CellLayout.java
index 2179511..29fe884 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CellLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/CellLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2017 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
@@ -13,7 +13,6 @@
 
 import java.util.ArrayList;
 import java.util.List;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
@@ -310,19 +309,18 @@
             }
 
             return result;
-        } else {
-            if (rowNum >= cols.size()) {
-                return defaultColSettings;
-            }
+		}
+		if (rowNum >= cols.size()) {
+			return defaultColSettings;
+		}
 
-            Row result = (Row) cols.get(rowNum);
+		Row result = (Row) cols.get(rowNum);
 
-            if (result == null) {
-                result = defaultColSettings;
-            }
+		if (result == null) {
+			result = defaultColSettings;
+		}
 
-            return result;
-        }
+		return result;
     }
 
     /**
@@ -391,22 +389,19 @@
                 // If we're larger in both dimensions, don't adjust the minimum
                 // size.
                 return preferredSize;
-            } else {
-                // If our preferred height is smaller than the minimum height,
-                // recompute the preferred width using the minimum height
-                return computeSize(composite, wHint, minimumSize.y, false);
             }
-        } else {
-            if (taller) {
-                // If our preferred width is smaller than the minimum width,
-                // recompute the preferred height using the minimum width
-                return computeSize(composite, minimumSize.x, hHint, false);
-            } else {
-                // If both dimensions are smaller than the minimum size,
-                // use the minimum size as our preferred size.
-                return minimumSize;
-            }
+			// If our preferred height is smaller than the minimum height,
+			// recompute the preferred width using the minimum height
+			return computeSize(composite, wHint, minimumSize.y, false);
         }
+		if (taller) {
+			// If our preferred width is smaller than the minimum width,
+			// recompute the preferred height using the minimum width
+			return computeSize(composite, minimumSize.x, hHint, false);
+		}
+		// If both dimensions are smaller than the minimum size,
+		// use the minimum size as our preferred size.
+		return minimumSize;
     }
 
     int[] computeSizes(int[] constraints, int availableSpace,
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/GridInfo.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/GridInfo.java
index 8b6ede6..49e6eba 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/GridInfo.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/GridInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2017 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
@@ -112,9 +112,8 @@
     public int getStartPos(int control, boolean row) {
         if (row) {
             return controlRow[control];
-        } else {
-            return controlCol[control];
         }
+		return controlCol[control];
     }
 
     /**
@@ -126,9 +125,8 @@
     public int getNumRows(boolean isRow) {
         if (isRow) {
             return rows;
-        } else {
-			return cols;
 		}
+		return cols;
     }
 
     public void getRow(int[] result, int rowId, boolean horizontal) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/ActionSet.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/ActionSet.java
index b31b41f..aaca47c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/ActionSet.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/ActionSet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2015 IBM Corporation and others.
+ * Copyright (c) 2010, 2017 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
@@ -450,9 +450,8 @@
 		if (item.getChildren().size() == 0) {
 			if (segment + 1 == menuPath.segmentCount()) {
 				return menu;
-			} else {
-				return null;
 			}
+			return null;
 		}
 		return findMenuFromPath(item, menuPath, segment + 1);
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalProgramImageDescriptor.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalProgramImageDescriptor.java
index 3f9ca4d..6a8e0f9 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalProgramImageDescriptor.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalProgramImageDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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,9 +47,8 @@
         String otherName = other.program.getName();
         if (otherName == null) {
 			return other.program.equals(program);
-		} else {
-            return otherName.equals(program.getName());
-        }
+		}
+		return otherName.equals(program.getName());
     }
 
     /**
@@ -94,8 +93,7 @@
         String programName = program.getName();
         if (programName == null) {
 			return program.hashCode();
-		} else {
-			return programName.hashCode();
 		}
+		return programName.hashCode();
     }
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StringMatcher.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StringMatcher.java
index 7ad6c85..fb244ee 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StringMatcher.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StringMatcher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000 - 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -247,10 +247,9 @@
         if (!fHasLeadingStar) {
             if (!regExpRegionMatches(text, start, current, 0, segLength)) {
                 continue;
-            } else {
-                ++i;
-                tCurPos = tCurPos + segLength;
             }
+				++i;
+				tCurPos = tCurPos + segLength;
         }
         if ((segments.length == 1) && (!fHasLeadingStar)
                 && (!fHasTrailingStar)) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBContrastFactory.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBContrastFactory.java
index 28c3b3f..ecd3289 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBContrastFactory.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBContrastFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2017 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,7 +11,6 @@
 package org.eclipse.ui.internal.themes;
 
 import java.util.Hashtable;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExecutableExtension;
@@ -139,9 +138,8 @@
 
         if (Math.abs(lbg1 - lfg) > Math.abs(lbg2 - lfg)) {
             return cbg1;
-        } else {
-            return cbg2;
         }
+		return cbg2;
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java
index 2f4b1ef..370e1f6 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -114,17 +114,16 @@
 
             if (l != r) {
 				return l - r;
-			} else {
-                for (int i = 0; i < l; i++) {
-                    int compareTo = compare(left[i], right[i]);
+			}
+			for (int i = 0; i < l; i++) {
+				int compareTo = compare(left[i], right[i]);
 
-                    if (compareTo != 0) {
-						return compareTo;
-					}
-                }
+				if (compareTo != 0) {
+					return compareTo;
+				}
+			}
 
-                return 0;
-            }
+			return 0;
         }
     }
 
@@ -145,18 +144,16 @@
 
             if (l != r) {
 				return l - r;
-			} else {
-                for (int i = 0; i < l; i++) {
-                    int compareTo = compare((Comparable) left.get(i),
-                            (Comparable) right.get(i));
+			}
+			for (int i = 0; i < l; i++) {
+				int compareTo = compare((Comparable) left.get(i), (Comparable) right.get(i));
 
-                    if (compareTo != 0) {
-						return compareTo;
-					}
-                }
+				if (compareTo != 0) {
+					return compareTo;
+				}
+			}
 
-                return 0;
-            }
+			return 0;
         }
     }
 
@@ -256,43 +253,41 @@
     public static boolean endsWith(List left, List right, boolean equals) {
         if (left == null || right == null) {
 			return false;
-		} else {
-            int l = left.size();
-            int r = right.size();
+		}
+		int l = left.size();
+		int r = right.size();
 
-            if (r > l || !equals && r == l) {
+		if (r > l || !equals && r == l) {
+			return false;
+		}
+
+		for (int i = 0; i < r; i++) {
+			if (!equals(left.get(l - i - 1), right.get(r - i - 1))) {
 				return false;
 			}
+		}
 
-            for (int i = 0; i < r; i++) {
-				if (!equals(left.get(l - i - 1), right.get(r - i - 1))) {
-					return false;
-				}
-			}
-
-            return true;
-        }
+		return true;
     }
 
     public static boolean endsWith(Object[] left, Object[] right, boolean equals) {
         if (left == null || right == null) {
 			return false;
-		} else {
-            int l = left.length;
-            int r = right.length;
+		}
+		int l = left.length;
+		int r = right.length;
 
-            if (r > l || !equals && r == l) {
+		if (r > l || !equals && r == l) {
+			return false;
+		}
+
+		for (int i = 0; i < r; i++) {
+			if (!equals(left[l - i - 1], right[r - i - 1])) {
 				return false;
 			}
+		}
 
-            for (int i = 0; i < r; i++) {
-				if (!equals(left[l - i - 1], right[r - i - 1])) {
-					return false;
-				}
-			}
-
-            return true;
-        }
+		return true;
     }
 
     public static boolean equals(boolean left, boolean right) {