Bug 474395 - Update org.eclipse.equinox.common to use Java 1.7 to remove
redundant type information 

Change-Id: If1039db38175a29ca9f6cf76c91e2351d848257a
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/bundles/org.eclipse.equinox.common/.classpath b/bundles/org.eclipse.equinox.common/.classpath
index 4c62a80..e8ea977 100644
--- a/bundles/org.eclipse.equinox.common/.classpath
+++ b/bundles/org.eclipse.equinox.common/.classpath
@@ -2,6 +2,6 @@
 <classpath>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/bundles/org.eclipse.equinox.common/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.common/.settings/org.eclipse.jdt.core.prefs
index 17eef45..9208aea 100644
--- a/bundles/org.eclipse.equinox.common/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.common/.settings/org.eclipse.jdt.core.prefs
@@ -14,9 +14,9 @@
 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -84,7 +84,7 @@
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
 org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
@@ -121,7 +121,7 @@
 org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF
index c9d1344..6f7d0a3 100644
--- a/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF
@@ -30,7 +30,7 @@
  org.osgi.service.packageadmin,
  org.osgi.service.url,
  org.osgi.util.tracker
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Comment-Header: Both Eclipse-LazyStart and Bundle-ActivationPolicy are specified for compatibility with 3.2
 Eclipse-LazyStart: true
 Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLHandler.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLHandler.java
index 011105f..46e1592 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLHandler.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLHandler.java
@@ -24,7 +24,7 @@
  */
 public class PlatformURLHandler extends AbstractURLStreamHandlerService {
 
-	private static Hashtable<String, Constructor<?>> connectionType = new Hashtable<String, Constructor<?>>();
+	private static Hashtable<String, Constructor<?>> connectionType = new Hashtable<>();
 
 	// URL protocol designations
 	public static final String PROTOCOL = "platform"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java
index 2f03467..996bb93 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/Activator.java
@@ -40,7 +40,7 @@
 	/**
 	 * Table to keep track of all the URL converter services.
 	 */
-	private static Map<String, ServiceTracker<Object, URLConverter>> urlTrackers = new HashMap<String, ServiceTracker<Object, URLConverter>>();
+	private static Map<String, ServiceTracker<Object, URLConverter>> urlTrackers = new HashMap<>();
 	private static BundleContext bundleContext;
 	private static Activator singleton;
 	private ServiceRegistration<URLConverter> platformURLConverterService = null;
@@ -69,7 +69,7 @@
 		bundleContext = context;
 		singleton = this;
 		RuntimeLog.setLogWriter(getPlatformWriter(context));
-		Dictionary<String, Object> urlProperties = new Hashtable<String, Object>();
+		Dictionary<String, Object> urlProperties = new Hashtable<>();
 		urlProperties.put("protocol", "platform"); //$NON-NLS-1$ //$NON-NLS-2$
 		platformURLConverterService = context.registerService(URLConverter.class, new PlatformURLConverter(), urlProperties);
 		adapterManagerService = context.registerService(IAdapterManager.class, AdapterManager.getDefault(), null);
@@ -103,7 +103,7 @@
 			} catch (InvalidSyntaxException e) {
 				// should not happen
 			}
-			configLocationTracker = new ServiceTracker<Object, Location>(bundleContext, filter, null);
+			configLocationTracker = new ServiceTracker<>(bundleContext, filter, null);
 			configLocationTracker.open();
 		}
 		return configLocationTracker.getService();
@@ -114,7 +114,7 @@
 	 */
 	public DebugOptions getDebugOptions() {
 		if (debugTracker == null) {
-			debugTracker = new ServiceTracker<Object, DebugOptions>(bundleContext, DebugOptions.class.getName(), null);
+			debugTracker = new ServiceTracker<>(bundleContext, DebugOptions.class.getName(), null);
 			debugTracker.open();
 		}
 		return debugTracker.getService();
@@ -125,7 +125,7 @@
 	 */
 	public FrameworkLog getFrameworkLog() {
 		if (logTracker == null) {
-			logTracker = new ServiceTracker<Object, FrameworkLog>(bundleContext, FrameworkLog.class.getName(), null);
+			logTracker = new ServiceTracker<>(bundleContext, FrameworkLog.class.getName(), null);
 			logTracker.open();
 		}
 		return logTracker.getService();
@@ -142,7 +142,7 @@
 			} catch (InvalidSyntaxException e) {
 				// ignore this.  It should never happen as we have tested the above format.
 			}
-			instanceLocationTracker = new ServiceTracker<Object, Location>(bundleContext, filter, null);
+			instanceLocationTracker = new ServiceTracker<>(bundleContext, filter, null);
 			instanceLocationTracker.open();
 		}
 		return instanceLocationTracker.getService();
@@ -174,7 +174,7 @@
 	 */
 	private PackageAdmin getBundleAdmin() {
 		if (bundleTracker == null) {
-			bundleTracker = new ServiceTracker<Object, PackageAdmin>(getContext(), PackageAdmin.class.getName(), null);
+			bundleTracker = new ServiceTracker<>(getContext(), PackageAdmin.class.getName(), null);
 			bundleTracker.open();
 		}
 		return bundleTracker.getService();
@@ -201,7 +201,7 @@
 			} catch (InvalidSyntaxException e) {
 				// should not happen
 			}
-			installLocationTracker = new ServiceTracker<Object, Location>(bundleContext, filter, null);
+			installLocationTracker = new ServiceTracker<>(bundleContext, filter, null);
 			installLocationTracker.open();
 		}
 		return installLocationTracker.getService();
@@ -234,7 +234,7 @@
 			if (context == null) {
 				throw new MissingResourceException(CommonMessages.activator_resourceBundleNotStarted, bundle.getSymbolicName(), ""); //$NON-NLS-1$
 			}
-			localizationTracker = new ServiceTracker<Object, BundleLocalization>(context, BundleLocalization.class.getName(), null);
+			localizationTracker = new ServiceTracker<>(context, BundleLocalization.class.getName(), null);
 			localizationTracker.open();
 		}
 		BundleLocalization location = localizationTracker.getService();
@@ -311,7 +311,7 @@
 					ServiceTracker<Object, URLConverter> tracker = urlTrackers.get(key);
 					tracker.close();
 				}
-				urlTrackers = new HashMap<String, ServiceTracker<Object, URLConverter>>();
+				urlTrackers = new HashMap<>();
 			}
 		}
 	}
@@ -334,7 +334,7 @@
 				} catch (InvalidSyntaxException e) {
 					return null;
 				}
-				tracker = new ServiceTracker<Object, URLConverter>(getContext(), filter, null);
+				tracker = new ServiceTracker<>(getContext(), filter, null);
 				tracker.open();
 				// cache it in the registry
 				urlTrackers.put(protocol, tracker);
@@ -356,7 +356,7 @@
 		if (service != null)
 			PlatformURLBaseConnection.startup(service.getURL());
 
-		Hashtable<String, String[]> properties = new Hashtable<String, String[]>(1);
+		Hashtable<String, String[]> properties = new Hashtable<>(1);
 		properties.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] {PlatformURLHandler.PROTOCOL});
 		getContext().registerService(URLStreamHandlerService.class.getName(), new PlatformURLHandler(), properties);
 	}
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
index acd671e..01d4e16 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
@@ -87,8 +87,8 @@
 	 * Private constructor to block instance creation.
 	 */
 	private AdapterManager() {
-		factories = new HashMap<String, List<IAdapterFactory>>(5);
-		lazyFactoryProviders = new ArrayList<IAdapterManagerProvider>(1);
+		factories = new HashMap<>(5);
+		lazyFactoryProviders = new ArrayList<>(1);
 	}
 
 	/**
@@ -124,10 +124,10 @@
 			//cache reference to lookup to protect against concurrent flush
 			Map<IAdapterFactory, Map<String, Class<?>>> lookup = classLookup;
 			if (lookup == null)
-				classLookup = lookup = new HashMap<IAdapterFactory, Map<String, Class<?>>>(4);
+				classLookup = lookup = new HashMap<>(4);
 			Map<String, Class<?>> classes = lookup.get(factory);
 			if (classes == null) {
-				classes = new HashMap<String, Class<?>>(4);
+				classes = new HashMap<>(4);
 				lookup.put(factory, classes);
 			}
 			classes.put(clazz.getName(), clazz);
@@ -207,7 +207,7 @@
 		Map<String, IAdapterFactory> table = lookup.get(adaptable.getName());
 		if (table == null) {
 			// calculate adapters for the class
-			table = new HashMap<String, IAdapterFactory>(4);
+			table = new HashMap<>(4);
 			Class<?>[] classes = computeClassOrder(adaptable);
 			for (int i = 0; i < classes.length; i++)
 				addFactoriesFor(classes[i].getName(), table);
@@ -244,9 +244,9 @@
 	 * The search order is defined in this class' comment.
 	 */
 	private Class<?>[] doComputeClassOrder(Class<?> adaptable) {
-		List<Class<?>> classes = new ArrayList<Class<?>>();
+		List<Class<?>> classes = new ArrayList<>();
 		Class<?> clazz = adaptable;
-		Set<Class<?>> seen = new HashSet<Class<?>>(4);
+		Set<Class<?>> seen = new HashSet<>(4);
 		//first traverse class hierarchy
 		while (clazz != null) {
 			classes.add(clazz);
@@ -260,7 +260,7 @@
 	}
 
 	private void computeInterfaceOrder(Class<?>[] interfaces, Collection<Class<?>> classes, Set<Class<?>> seen) {
-		List<Class<?>> newInterfaces = new ArrayList<Class<?>>(interfaces.length);
+		List<Class<?>> newInterfaces = new ArrayList<>(interfaces.length);
 		for (int i = 0; i < interfaces.length; i++) {
 			Class<?> interfac = interfaces[i];
 			if (seen.add(interfac)) {
@@ -381,7 +381,7 @@
 	public void registerFactory(IAdapterFactory factory, String adaptableType) {
 		List<IAdapterFactory> list = factories.get(adaptableType);
 		if (list == null) {
-			list = new ArrayList<IAdapterFactory>(5);
+			list = new ArrayList<>(5);
 			factories.put(adaptableType, list);
 		}
 		list.add(factory);
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DevClassPathHelper.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DevClassPathHelper.java
index dfa463b..c02402d 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DevClassPathHelper.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DevClassPathHelper.java
@@ -63,7 +63,7 @@
 	public static String[] getArrayFromList(String prop) {
 		if (prop == null || prop.trim().equals("")) //$NON-NLS-1$
 			return new String[0];
-		Vector<String> list = new Vector<String>();
+		Vector<String> list = new Vector<>();
 		StringTokenizer tokens = new StringTokenizer(prop, ","); //$NON-NLS-1$
 		while (tokens.hasMoreTokens()) {
 			String token = tokens.nextToken().trim();
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/FindSupport.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/FindSupport.java
index 44d175a..f2b62e3 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/FindSupport.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/FindSupport.java
@@ -32,7 +32,7 @@
 	private static String[] NL_JAR_VARIANTS = buildNLVariants(Activator.getContext() == null ? System.getProperty(PROP_NL) : Activator.getContext().getProperty(PROP_NL));
 
 	private static String[] buildNLVariants(String nl) {
-		ArrayList<String> result = new ArrayList<String>();
+		ArrayList<String> result = new ArrayList<>();
 		IPath base = new Path("nl"); //$NON-NLS-1$
 
 		IPath path = new Path(nl.replace('_', '/'));
@@ -72,7 +72,7 @@
 	 * See doc on {@link FileLocator#findEntries(Bundle, IPath, Map)}
 	 */
 	public static URL[] findEntries(Bundle bundle, IPath path, Map<String, String> override) {
-		ArrayList<URL> results = new ArrayList<URL>(1);
+		ArrayList<URL> results = new ArrayList<>(1);
 		find(bundle, path, override, results);
 		return results.toArray(new URL[results.size()]);
 	}
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java
index e390e1c..0a03be3 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java
@@ -62,7 +62,7 @@
 
 	public static FrameworkLogEntry getLog(IStatus status) {
 		Throwable t = status.getException();
-		ArrayList<FrameworkLogEntry> childlist = new ArrayList<FrameworkLogEntry>();
+		ArrayList<FrameworkLogEntry> childlist = new ArrayList<>();
 
 		int stackCode = t instanceof CoreException ? 1 : 0;
 		// ensure a substatus inside a CoreException is properly logged 
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java
index 9a31fba..a854180 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ReferenceHashSet.java
@@ -124,7 +124,7 @@
 
 	int threshold;
 
-	ReferenceQueue<T> referenceQueue = new ReferenceQueue<T>();
+	ReferenceQueue<T> referenceQueue = new ReferenceQueue<>();
 
 	public ReferenceHashSet() {
 		this(5);
@@ -159,11 +159,11 @@
 	private HashedReference<T> toReference(int type, T referent) {
 		switch (type) {
 			case HARD :
-				return new StrongReference<T>(referent, referenceQueue);
+				return new StrongReference<>(referent, referenceQueue);
 			case SOFT :
-				return new HashableSoftReference<T>(referent, referenceQueue);
+				return new HashableSoftReference<>(referent, referenceQueue);
 			case WEAK :
-				return new HashableWeakReference<T>(referent, referenceQueue);
+				return new HashableWeakReference<>(referent, referenceQueue);
 			default :
 				throw new Error();
 		}
@@ -263,7 +263,7 @@
 	}
 
 	private void rehash() {
-		ReferenceHashSet<T> newHashSet = new ReferenceHashSet<T>(this.elementSize * 2); // double the number of expected elements
+		ReferenceHashSet<T> newHashSet = new ReferenceHashSet<>(this.elementSize * 2); // double the number of expected elements
 		newHashSet.referenceQueue = this.referenceQueue;
 		HashedReference<T> currentValue;
 		for (int i = 0, length = this.values.length; i < length; i++)
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
index 98f5e30..745535d 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
@@ -104,7 +104,7 @@
 	}
 
 	private static ClassLoader createTempClassloader(Bundle b) {
-		ArrayList<URL> classpath = new ArrayList<URL>();
+		ArrayList<URL> classpath = new ArrayList<>();
 		addClasspathEntries(b, classpath);
 		addBundleRoot(b, classpath);
 		addDevEntries(b, classpath);
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java
index cb9ae76..4fea5a0 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java
@@ -22,7 +22,7 @@
  */
 public final class RuntimeLog {
 
-	private static ArrayList<ILogListener> logListeners = new ArrayList<ILogListener>(5);
+	private static ArrayList<ILogListener> logListeners = new ArrayList<>(5);
 
 	/**
 	 * Keep the messages until the first log listener is registered.
@@ -30,7 +30,7 @@
 	 * all status messages accumulated during the period when no log
 	 * listener was available.
 	 */
-	private static ArrayList<IStatus> queuedMessages = new ArrayList<IStatus>(5);
+	private static ArrayList<IStatus> queuedMessages = new ArrayList<>(5);
 
 	private static PlatformLogWriter logWriter;
 
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/PluginVersionIdentifier.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/PluginVersionIdentifier.java
index d86c053..aa0eff7 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/PluginVersionIdentifier.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/PluginVersionIdentifier.java
@@ -157,7 +157,7 @@
 			Assert.isTrue(false, NLS.bind(CommonMessages.parse_doubleSeparatorVersion, s));
 
 		StringTokenizer st = new StringTokenizer(s, SEPARATOR);
-		Vector<String> elements = new Vector<String>(4);
+		Vector<String> elements = new Vector<>(4);
 
 		while (st.hasMoreTokens())
 			elements.addElement(st.nextToken());