[426209] Java 6 + Cleaning some warnings

* Move to Java 6
Cleaned Findbugs reports
* URL.equals
* Templates to avoid unsafe casts
* equals returns false

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=426209
Signed-off-by: Mickael Istria <mistria@redhat.com>
Change-Id: I96171055442f95941de0dff66d7c30d482a871c3
diff --git a/bundles/org.eclipse.wst.jsdt.core/.classpath b/bundles/org.eclipse.wst.jsdt.core/.classpath
index ce73933..121e527 100644
--- a/bundles/org.eclipse.wst.jsdt.core/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.core/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF
index 0dd7fe4..025b0b9 100644
--- a/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF
@@ -58,7 +58,7 @@
  org.eclipse.team.core;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
  org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)"
 Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Main-Class: org.eclipse.wst.jsdt.internal.compiler.batch.Main
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/launching/AbstractVMInstall.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/launching/AbstractVMInstall.java
index 0a4b7b9..996efb8 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/launching/AbstractVMInstall.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/launching/AbstractVMInstall.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mickael Istria (Red Hat Inc.) - 426209 Java 6 + Warnings cleanup
  *******************************************************************************/
 package org.eclipse.wst.jsdt.launching;
 
@@ -188,7 +189,7 @@
 			return;
 		}
 		if (url != null && fJavadocLocation != null) {
-			if (url.equals(fJavadocLocation)) {
+			if (url.toString().equals(fJavadocLocation.toString())) {
 				// no change
 				return;
 			}
diff --git a/bundles/org.eclipse.wst.jsdt.debug.core/.classpath b/bundles/org.eclipse.wst.jsdt.debug.core/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.core/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.debug.core/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.jsdt.debug.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.debug.core/META-INF/MANIFEST.MF
index b7462d7..95ea345 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.debug.core/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.debug.core,
  org.eclipse.core.resources
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.jsdt.debug.core.breakpoints,
  org.eclipse.wst.jsdt.debug.core.jsdi,
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/.classpath b/bundles/org.eclipse.wst.jsdt.debug.crossfire/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.jsdt.debug.crossfire/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.debug.crossfire/META-INF/MANIFEST.MF
index 13452da..96d0680 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.crossfire/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.debug.crossfire/META-INF/MANIFEST.MF
@@ -11,7 +11,7 @@
  org.eclipse.wst.jsdt.core;bundle-version="1.0.0",
  org.eclipse.debug.core,
  org.eclipse.core.resources
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.jsdt.debug.internal.crossfire;x-internal:=true,
  org.eclipse.wst.jsdt.debug.internal.crossfire.connect;x-internal:=true,
diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/.classpath b/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/META-INF/MANIFEST.MF
index 2838817..9d86ec8 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.debug.rhino.debugger/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.wst.jsdt.debug.rhino.debugger
 Bundle-Version: 1.0.400.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Export-Package: org.eclipse.wst.jsdt.debug.internal.rhino.debugger;x-internal:=true,
  org.eclipse.wst.jsdt.debug.internal.rhino.transport;x-friends:="org.eclipse.wst.jsdt.debug.rhino",
  org.eclipse.wst.jsdt.debug.rhino.debugger,
diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/.classpath b/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/META-INF/MANIFEST.MF
index 99b6758..d5662dc 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.debug.rhino.ui/META-INF/MANIFEST.MF
@@ -22,7 +22,7 @@
  org.eclipse.core.expressions,
  org.eclipse.wst.jsdt.ui,
  org.eclipse.core.resources
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.jsdt.debug.internal.rhino.ui;x-internal:=true,
  org.eclipse.wst.jsdt.debug.internal.rhino.ui.launching;x-internal:=true,
diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino/.classpath b/bundles/org.eclipse.wst.jsdt.debug.rhino/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.rhino/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.debug.rhino/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.debug.rhino/META-INF/MANIFEST.MF
index 6fc4efe..cd05bd1 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.rhino/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.debug.rhino/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@
 Bundle-Version: 1.0.300.qualifier
 Bundle-Activator: org.eclipse.wst.jsdt.debug.internal.rhino.RhinoDebugPlugin
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.jsdt.debug.internal.rhino;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
  org.eclipse.wst.jsdt.debug.internal.rhino.breakpoints;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
diff --git a/bundles/org.eclipse.wst.jsdt.debug.transport/.classpath b/bundles/org.eclipse.wst.jsdt.debug.transport/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.transport/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.debug.transport/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.jsdt.debug.transport/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.debug.transport/META-INF/MANIFEST.MF
index 37dcb4e..23726fd 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.transport/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.debug.transport/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.eclipse.wst.jsdt.debug.transport
 Bundle-Version: 1.0.200.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: %providerName
 Export-Package: org.eclipse.wst.jsdt.debug.transport,
  org.eclipse.wst.jsdt.debug.transport.exception,
diff --git a/bundles/org.eclipse.wst.jsdt.debug.ui/.classpath b/bundles/org.eclipse.wst.jsdt.debug.ui/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.ui/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.debug.ui/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.wst.jsdt.debug.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.debug.ui/META-INF/MANIFEST.MF
index 3aaa6d9..52f2256 100644
--- a/bundles/org.eclipse.wst.jsdt.debug.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.debug.ui/META-INF/MANIFEST.MF
@@ -19,7 +19,7 @@
  org.eclipse.core.expressions,
  org.eclipse.debug.core,
  org.eclipse.core.resources
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.wst.jsdt.debug.internal.ui.filters"
 Export-Package: org.eclipse.wst.jsdt.debug.internal.ui;x-friends:="org.eclipse.wst.jsdt.debug.rhino.ui",
  org.eclipse.wst.jsdt.debug.internal.ui.actions;x-internal:=true,
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/.classpath b/bundles/org.eclipse.wst.jsdt.manipulation/.classpath
index ce73933..121e527 100644
--- a/bundles/org.eclipse.wst.jsdt.manipulation/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.manipulation/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/bundles/org.eclipse.wst.jsdt.manipulation/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.manipulation/META-INF/MANIFEST.MF
index 2e509d5..077e1d3 100644
--- a/bundles/org.eclipse.wst.jsdt.manipulation/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.manipulation/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@
 Eclipse-LazyStart: true
 Bundle-SymbolicName: org.eclipse.wst.jsdt.manipulation;singleton:=true
 Bundle-Name: %pluginName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Localization: plugin
 Bundle-Vendor: %providerName
 Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.wst.jsdt.support.firefox/.classpath b/bundles/org.eclipse.wst.jsdt.support.firefox/.classpath
index ce73933..121e527 100644
--- a/bundles/org.eclipse.wst.jsdt.support.firefox/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.support.firefox/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/bundles/org.eclipse.wst.jsdt.support.firefox/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.support.firefox/META-INF/MANIFEST.MF
index 12ef00e..1c9c525 100644
--- a/bundles/org.eclipse.wst.jsdt.support.firefox/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.support.firefox/META-INF/MANIFEST.MF
@@ -9,7 +9,7 @@
  org.eclipse.swt;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.wst.jsdt.support.ie/.classpath b/bundles/org.eclipse.wst.jsdt.support.ie/.classpath
index ce73933..121e527 100644
--- a/bundles/org.eclipse.wst.jsdt.support.ie/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.support.ie/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/bundles/org.eclipse.wst.jsdt.support.ie/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.support.ie/META-INF/MANIFEST.MF
index 76cd235..d081738 100644
--- a/bundles/org.eclipse.wst.jsdt.support.ie/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.support.ie/META-INF/MANIFEST.MF
@@ -8,6 +8,6 @@
  org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor.0
diff --git a/bundles/org.eclipse.wst.jsdt.ui/.classpath b/bundles/org.eclipse.wst.jsdt.ui/.classpath
index ce73933..deb6736 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/.classpath
+++ b/bundles/org.eclipse.wst.jsdt.ui/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF
index da06be7..aa095d6 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF
@@ -129,7 +129,7 @@
  org.eclipse.ui.navigator;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.wst.jsdt.manipulation;bundle-version="[1.0.200,2.0.0)"
 Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
 
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java
index 466ec3e..205ce48 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mickael Istria (Red Hat Inc.) - 426209 Java 6 + Warnings cleanup
  *******************************************************************************/
 package org.eclipse.wst.jsdt.internal.corext.refactoring.typeconstraints;
 
@@ -14,7 +15,6 @@
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
@@ -100,18 +100,17 @@
 	public ITypeConstraint[] create(ArrayInitializer arrayInitializer){
 		ITypeBinding arrayBinding= arrayInitializer.resolveTypeBinding();
 		Assert.isTrue(arrayBinding.isArray());
-		List expressions= arrayInitializer.expressions();
-		List/*<ITypeConstraint>*/ constraints= new ArrayList();
+		List<Expression> expressions= (List<Expression>)arrayInitializer.expressions();
+		List<ITypeConstraint> constraints= new ArrayList<ITypeConstraint>();
 		Type type= getTypeParent(arrayInitializer);
 		ConstraintVariable typeVariable= fConstraintVariableFactory.makeTypeVariable(type);
-		for (int i= 0; i < expressions.size(); i++) {
-			Expression each= (Expression) expressions.get(i);
+		for (Expression each : expressions) {
 			ITypeConstraint[] c= fTypeConstraintFactory.createSubtypeConstraint(
 					fConstraintVariableFactory.makeExpressionOrTypeVariable(each, getContext()),
 					typeVariable);
 			constraints.addAll(Arrays.asList(c));
 		}		
-		return (ITypeConstraint[])constraints.toArray(new ITypeConstraint[constraints.size()]);
+		return constraints.toArray(new ITypeConstraint[constraints.size()]);
 	}
 
 	/* (non-Javadoc)
@@ -136,10 +135,10 @@
 				nameVariable,
 				fConstraintVariableFactory.makeRawBindingVariable(throwable));
 		
-		ArrayList result= new ArrayList();
+		ArrayList<ITypeConstraint> result= new ArrayList<ITypeConstraint>();
 		result.addAll(Arrays.asList(defines));
 		result.addAll(Arrays.asList(catchBound));
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);		
+		return result.toArray(new ITypeConstraint[result.size()]);		
 	}
 
 
@@ -147,8 +146,8 @@
 	 * @see org.eclipse.wst.jsdt.core.dom.ASTVisitor#visit(org.eclipse.wst.jsdt.core.dom.ClassInstanceCreation)
 	 */
 	public ITypeConstraint[] create(ClassInstanceCreation instanceCreation){
-		List arguments= instanceCreation.arguments();
-		List result= new ArrayList(arguments.size());
+		List<ITypeConstraint> arguments= (List<ITypeConstraint>)instanceCreation.arguments();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>(arguments.size());
 		IFunctionBinding methodBinding= instanceCreation.resolveConstructorBinding();
 		result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding)));
 		if (instanceCreation.getAnonymousClassDeclaration() == null){
@@ -156,18 +155,18 @@
 			ConstraintVariable typeVar= fConstraintVariableFactory.makeRawBindingVariable(instanceCreation.resolveTypeBinding());
 			result.addAll(Arrays.asList(fTypeConstraintFactory.createDefinesConstraint(constructorVar, typeVar)));
 		}
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);		
+		return result.toArray(new ITypeConstraint[result.size()]);		
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.wst.jsdt.core.dom.ASTVisitor#visit(org.eclipse.wst.jsdt.core.dom.ConstructorInvocation)
 	 */
 	public ITypeConstraint[] create(ConstructorInvocation invocation){
-		List arguments= invocation.arguments();
-		List result= new ArrayList(arguments.size());
+		List<ITypeConstraint> arguments= (List<ITypeConstraint>)invocation.arguments();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>(arguments.size());
 		IFunctionBinding methodBinding= invocation.resolveConstructorBinding();
 		result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding)));
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 
 	/* (non-Javadoc)
@@ -187,11 +186,11 @@
 	 * @see org.eclipse.wst.jsdt.core.dom.ASTVisitor#visit(org.eclipse.wst.jsdt.core.dom.FieldDeclaration)
 	 */
 	public ITypeConstraint[] create(FieldDeclaration fd){
-		List result= new ArrayList();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>();
 		result.addAll(Arrays.asList(getConstraintsFromFragmentList(fd.fragments(), fd.getType())));
 		result.addAll(getConstraintsForHiding(fd));
 		result.addAll(getConstraintsForFieldDeclaringTypes(fd));
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 
 	/* (non-Javadoc)
@@ -212,7 +211,7 @@
 	 * @see org.eclipse.wst.jsdt.core.dom.ASTVisitor#visit(org.eclipse.wst.jsdt.core.dom.ConditionalExpression)
 	 */
 	public ITypeConstraint[] create(ConditionalExpression node) {
-		List result= new ArrayList();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>();
 		Expression thenExpression= node.getThenExpression();
 		Expression elseExpression= node.getElseExpression();
 		ConstraintVariable whole= fConstraintVariableFactory.makeExpressionOrTypeVariable(node, getContext());
@@ -224,14 +223,14 @@
 		result.addAll(Arrays.asList(constraints1));
 		result.addAll(Arrays.asList(constraints2));
 		result.addAll(Arrays.asList(constraints3));
-		return (ITypeConstraint[])result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.wst.jsdt.core.dom.ASTVisitor#visit(org.eclipse.wst.jsdt.core.dom.FunctionDeclaration)
 	 */
 	public ITypeConstraint[] create(FunctionDeclaration declaration){
-		List result= new ArrayList();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>();
 		IFunctionBinding methodBinding= declaration.resolveBinding();
 		if (methodBinding == null)
 			return new ITypeConstraint[0];
@@ -258,7 +257,7 @@
 			Collection constraintsForOverriding = getConstraintsForOverriding(methodBinding);
 			result.addAll(constraintsForOverriding);
 		}
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 
 	/* (non-Javadoc)
@@ -276,7 +275,7 @@
 	 */
 	public ITypeConstraint[] create(FunctionInvocation invocation){
 		List arguments= invocation.arguments();
-		List result= new ArrayList(arguments.size());
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>(arguments.size());
 		IFunctionBinding methodBinding= invocation.resolveMethodBinding();
 		if (methodBinding == null)
 			return new ITypeConstraint[0];
@@ -291,13 +290,13 @@
 				if (rootDefs.length == 1){
 					result.addAll(Arrays.asList(fTypeConstraintFactory.createSubtypeConstraint(expressionVar, fConstraintVariableFactory.makeDeclaringTypeVariable(rootDefs[0]))));
 				}else{	
-					Collection/*<ITypeConstraint>*/ constraints= new ArrayList(); 
+					Collection<ITypeConstraint> constraints= new ArrayList<ITypeConstraint>(); 
 					for (int i= 0; i < rootDefs.length; i++) {
 						ConstraintVariable rootDefTypeVar= fConstraintVariableFactory.makeDeclaringTypeVariable(rootDefs[i]);
 						ITypeConstraint[] tc= fTypeConstraintFactory.createSubtypeConstraint(expressionVar, rootDefTypeVar);
 						constraints.addAll(Arrays.asList(tc));
 					}
-					ITypeConstraint[] constraintsArray= (ITypeConstraint[])constraints.toArray(new ITypeConstraint[constraints.size()]);
+					ITypeConstraint[] constraintsArray= constraints.toArray(new ITypeConstraint[constraints.size()]);
 					if (constraintsArray.length > 0){
 						result.add(fTypeConstraintFactory.createCompositeOrTypeConstraint(constraintsArray));
 					}
@@ -308,7 +307,7 @@
 				result.addAll(Arrays.asList(fTypeConstraintFactory.createSubtypeConstraint(expressionVar, typeVar)));
 			}
 		}
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 
 	/* (non-Javadoc)
@@ -358,10 +357,10 @@
 		} else if (constraints.length == 0){
 			return defines;
 		} else {
-			List all= new ArrayList();
+			List<ITypeConstraint> all= new ArrayList<ITypeConstraint>();
 			all.addAll(Arrays.asList(defines));
 			all.addAll(Arrays.asList(constraints));
-			return (ITypeConstraint[])all.toArray();
+			return all.toArray(new ITypeConstraint[all.size()]);
 		}
 	}
 
@@ -369,11 +368,11 @@
 	 * @see org.eclipse.wst.jsdt.core.dom.ASTVisitor#visit(org.eclipse.wst.jsdt.core.dom.SuperConstructorInvocation)
 	 */
 	public ITypeConstraint[] create(SuperConstructorInvocation invocation){
-		List arguments= invocation.arguments();
-		List result= new ArrayList(arguments.size());
+		List<ITypeConstraint> arguments= invocation.arguments();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>(arguments.size());
 		IFunctionBinding methodBinding= invocation.resolveConstructorBinding();
 		result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding)));
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 	
 	/* (non-Javadoc)
@@ -392,13 +391,13 @@
 	 * @see org.eclipse.wst.jsdt.core.dom.ASTVisitor#visit(org.eclipse.wst.jsdt.core.dom.SuperMethodInvocation)
 	 */
 	public ITypeConstraint[] create(SuperMethodInvocation invocation){
-		List arguments= invocation.arguments();
-		List result= new ArrayList(arguments.size());
+		List<ITypeConstraint> arguments= invocation.arguments();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>(arguments.size());
 		IFunctionBinding methodBinding= invocation.resolveMethodBinding();
 		ITypeConstraint[] returnTypeConstraint= getReturnTypeConstraint(invocation, methodBinding);
 		result.addAll(Arrays.asList(returnTypeConstraint));
 		result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding)));
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 
 	/* (non-Javadoc)
@@ -438,10 +437,10 @@
 
 	//--------- private helpers ----------------//
 	
-	private Collection getConstraintsForFieldDeclaringTypes(FieldDeclaration fd) {
-		Collection result= new ArrayList(fd.fragments().size());
-		for (Iterator iter= fd.fragments().iterator(); iter.hasNext();) {
-			VariableDeclarationFragment varDecl= (VariableDeclarationFragment) iter.next();
+	private Collection<ITypeConstraint> getConstraintsForFieldDeclaringTypes(FieldDeclaration fd) {
+		Collection<ITypeConstraint> result= new ArrayList<ITypeConstraint>(fd.fragments().size());
+		for (Object item : fd.fragments()) {
+			VariableDeclarationFragment varDecl= (VariableDeclarationFragment) item;
 			IVariableBinding binding= varDecl.resolveBinding();
 			Assert.isTrue(binding.isField());
 			result.addAll(Arrays.asList(fTypeConstraintFactory.createDefinesConstraint(
@@ -451,22 +450,21 @@
 		return result;
 	}
 	
-	private Collection getConstraintsForHiding(FieldDeclaration fd) {
-		Collection result= new ArrayList();
-		for (Iterator iter= fd.fragments().iterator(); iter.hasNext();) {
-			result.addAll(getConstraintsForHiding((VariableDeclarationFragment) iter.next()));
+	private Collection<ITypeConstraint> getConstraintsForHiding(FieldDeclaration fd) {
+		Collection<ITypeConstraint> result= new ArrayList<ITypeConstraint>();
+		for (Object item : fd.fragments()) {
+			result.addAll(getConstraintsForHiding((VariableDeclarationFragment) item));
 		}
 		return result;
 	}
 	
-	private Collection getConstraintsForHiding(VariableDeclarationFragment fragment) {
-		Collection result= new ArrayList();
+	private Collection<ITypeConstraint> getConstraintsForHiding(VariableDeclarationFragment fragment) {
+		Collection<ITypeConstraint> result= new ArrayList<ITypeConstraint>();
 		IVariableBinding fieldBinding= fragment.resolveBinding();
 		Assert.isTrue(fieldBinding.isField());
-		Set declaringTypes= getDeclaringSuperTypes(fieldBinding);
+		Set<ITypeBinding> declaringTypes= getDeclaringSuperTypes(fieldBinding);
 		ConstraintVariable hiddingFieldVar= fConstraintVariableFactory.makeDeclaringTypeVariable(fieldBinding);
-		for (Iterator iter= declaringTypes.iterator(); iter.hasNext();) {
-			ITypeBinding declaringSuperType= (ITypeBinding) iter.next();
+		for (ITypeBinding declaringSuperType : declaringTypes) {
 			IVariableBinding hiddenField= findField(fieldBinding, declaringSuperType);
 			Assert.isTrue(hiddenField.isField());
 			ConstraintVariable hiddenFieldVar= fConstraintVariableFactory.makeDeclaringTypeVariable(hiddenField);
@@ -475,31 +473,28 @@
 		return result;
 	}
 	
-	private ITypeConstraint[] getConstraintsFromFragmentList(List fragments, Type type) {
-		int size= fragments.size();
+	private ITypeConstraint[] getConstraintsFromFragmentList(List<VariableDeclarationFragment> fragments, Type type) {
 		ConstraintVariable typeVariable= fConstraintVariableFactory.makeTypeVariable(type);
-		List result= new ArrayList((size * (size - 1))/2);
-		for (int i= 0; i < size; i++) {
-			VariableDeclarationFragment fragment1= (VariableDeclarationFragment) fragments.get(i);
+		int size = fragments.size();
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>((size * (size - 1))/2);
+		for (VariableDeclarationFragment fragment1 : fragments) {
 			SimpleName fragment1Name= fragment1.getName();
 			result.addAll(Arrays.asList(fTypeConstraintFactory.createDefinesConstraint(
 					fConstraintVariableFactory.makeExpressionOrTypeVariable(fragment1Name, getContext()),
 					typeVariable)));
-			for (int j= i + 1; j < size; j++) {
-				VariableDeclarationFragment fragment2= (VariableDeclarationFragment) fragments.get(j);
+			for (VariableDeclarationFragment fragment2 : fragments) {
 				result.addAll(Arrays.asList(fTypeConstraintFactory.createEqualsConstraint(
 						fConstraintVariableFactory.makeExpressionOrTypeVariable(fragment1Name, getContext()),
 						fConstraintVariableFactory.makeExpressionOrTypeVariable(fragment2.getName(), getContext()))));
 			}
 		}
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
+		return result.toArray(new ITypeConstraint[result.size()]);
 	}
 	
-	private Collection getConstraintsForOverriding(IFunctionBinding overriddingMethod) {
-		Collection result= new ArrayList();
-		Set declaringSupertypes= getDeclaringSuperTypes(overriddingMethod);
-		for (Iterator iter= declaringSupertypes.iterator(); iter.hasNext();) {
-			ITypeBinding superType= (ITypeBinding) iter.next();
+	private Collection<ITypeConstraint> getConstraintsForOverriding(IFunctionBinding overriddingMethod) {
+		Collection<ITypeConstraint> result= new ArrayList<ITypeConstraint>();
+		Set<ITypeBinding> declaringSupertypes= getDeclaringSuperTypes(overriddingMethod);
+		for (ITypeBinding superType : declaringSupertypes) {
 			IFunctionBinding overriddenMethod= findMethod(overriddingMethod, superType);
 			Assert.isNotNull(overriddenMethod);//because we asked for declaring types
 			if (Bindings.equals(overriddingMethod, overriddenMethod)) continue;
@@ -530,16 +525,18 @@
 		return fTypeConstraintFactory.createDefinesConstraint(invocationVariable, returnTypeVariable);
 	}
 	
-	private ITypeConstraint[] getArgumentConstraints(List arguments, IFunctionBinding methodBinding){
-		List result= new ArrayList(arguments.size());
+	private ITypeConstraint[] getArgumentConstraints(List<?> arguments, IFunctionBinding methodBinding){
+		List<ITypeConstraint> result= new ArrayList<ITypeConstraint>(arguments.size());
 		for (int i= 0, n= arguments.size(); i < n; i++) {
-			Expression argument= (Expression) arguments.get(i);
-			ConstraintVariable expressionVariable= fConstraintVariableFactory.makeExpressionOrTypeVariable(argument, getContext());
-			ConstraintVariable parameterTypeVariable= fConstraintVariableFactory.makeParameterTypeVariable(methodBinding, i);
-			ITypeConstraint[] argConstraint= fTypeConstraintFactory.createSubtypeConstraint(expressionVariable, parameterTypeVariable);
-			result.addAll(Arrays.asList(argConstraint));
+			if (arguments.get(i) instanceof Expression) {
+				Expression argument= (Expression) arguments.get(i);
+				ConstraintVariable expressionVariable= fConstraintVariableFactory.makeExpressionOrTypeVariable(argument, getContext());
+				ConstraintVariable parameterTypeVariable= fConstraintVariableFactory.makeParameterTypeVariable(methodBinding, i);
+				ITypeConstraint[] argConstraint= fTypeConstraintFactory.createSubtypeConstraint(expressionVariable, parameterTypeVariable);
+				result.addAll(Arrays.asList(argConstraint));
+			}
 		}
-		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);		
+		return result.toArray(new ITypeConstraint[result.size()]);		
 	}
 	
 	private static Type getTypeParent(ArrayInitializer arrayInitializer) {
@@ -603,11 +600,10 @@
 	/* 
 	 * return Set of ITypeBindings
 	 */
-	private static Set getDeclaringSuperTypes(IVariableBinding fieldBinding) {
+	private static Set<ITypeBinding> getDeclaringSuperTypes(IVariableBinding fieldBinding) {
 		ITypeBinding[] allSuperTypes= Bindings.getAllSuperTypes(fieldBinding.getDeclaringClass());
-		Set result= new HashSet();
-		for (int i= 0; i < allSuperTypes.length; i++) {
-			ITypeBinding type= allSuperTypes[i];
+		Set<ITypeBinding> result= new HashSet<ITypeBinding>();
+		for (ITypeBinding type : allSuperTypes) {
 			if (findField(fieldBinding, type) != null)
 				result.add(type);
 		}
@@ -616,10 +612,9 @@
 	
 	//--- RootDef ----//
 	protected static IFunctionBinding[] getRootDefs(IFunctionBinding methodBinding) {
-		Set/*<ITypeBinding>*/ declaringSuperTypes= getDeclaringSuperTypes(methodBinding);
-		Set/*<IFunctionBinding>*/ result= new LinkedHashSet();
-		for (Iterator iter= declaringSuperTypes.iterator(); iter.hasNext();) {
-			ITypeBinding type= (ITypeBinding) iter.next();
+		Set<ITypeBinding> declaringSuperTypes= getDeclaringSuperTypes(methodBinding);
+		Set<IFunctionBinding> result= new LinkedHashSet<IFunctionBinding>();
+		for (ITypeBinding type : declaringSuperTypes) {
 			if (! containsASuperType(type, declaringSuperTypes))
 				result.add(findMethod(methodBinding, type));
 		}
@@ -627,7 +622,7 @@
 		if (result.size() == 0){
 			result.add(methodBinding);
 		}
-		return (IFunctionBinding[]) result.toArray(new IFunctionBinding[result.size()]);
+		return result.toArray(new IFunctionBinding[result.size()]);
 	}
 	
 	/* 
@@ -635,9 +630,8 @@
 	 * @return <code>true</code> iff <code>declaringSuperTypes</code> contains a type
 	 * 		which is a strict supertype of <code>type</code>
 	 */
-	private static boolean containsASuperType(ITypeBinding type, Set declaringSuperTypes) {
-		for (Iterator iter= declaringSuperTypes.iterator(); iter.hasNext();) {
-			ITypeBinding maybeSuperType= (ITypeBinding) iter.next();
+	private static boolean containsASuperType(ITypeBinding type, Set<ITypeBinding> declaringSuperTypes) {
+		for (ITypeBinding maybeSuperType : declaringSuperTypes) {
 			if (! Bindings.equals(maybeSuperType, type) && Bindings.isSuperType(maybeSuperType, type))
 				return true;
 		}
@@ -647,15 +641,14 @@
 	/* 
 	 * return Set of ITypeBindings
 	 */
-	protected static Set getDeclaringSuperTypes(IFunctionBinding methodBinding) {
+	protected static Set<ITypeBinding> getDeclaringSuperTypes(IFunctionBinding methodBinding) {
 		ITypeBinding superClass = methodBinding.getDeclaringClass();
-		Set allSuperTypes= new LinkedHashSet();
+		Set<ITypeBinding> allSuperTypes= new LinkedHashSet<ITypeBinding>();
 		allSuperTypes.addAll(Arrays.asList(Bindings.getAllSuperTypes(superClass)));
 		if (allSuperTypes.isEmpty())
 			allSuperTypes.add(methodBinding.getDeclaringClass()); //TODO: Why only iff empty? The declaring class is not a supertype ...
-		Set result= new HashSet();
-		for (Iterator iter= allSuperTypes.iterator(); iter.hasNext();) {
-			ITypeBinding type= (ITypeBinding) iter.next();
+		Set<ITypeBinding> result= new HashSet<ITypeBinding>();
+		for (ITypeBinding type : allSuperTypes) {
 			if (findMethod(methodBinding, type) != null)
 				result.add(type);
 		}
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/javadocexport/JavadocWizard.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/javadocexport/JavadocWizard.java
index 397a780..135e8e6 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/javadocexport/JavadocWizard.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/javadocexport/JavadocWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Sebastian Davids <sdavids@gmx.de> bug 38692
+ *     Mickael Istria (Red Hat Inc.) - 426209 Java 6 + Warnings cleanup
  *******************************************************************************/
 package org.eclipse.wst.jsdt.internal.ui.javadocexport;
 
@@ -15,6 +16,8 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -57,8 +60,8 @@
 import org.eclipse.wst.jsdt.core.IJavaScriptElement;
 import org.eclipse.wst.jsdt.core.IJavaScriptProject;
 import org.eclipse.wst.jsdt.internal.corext.util.Messages;
-import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin;
 import org.eclipse.wst.jsdt.internal.ui.JavaPluginImages;
+import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin;
 import org.eclipse.wst.jsdt.internal.ui.actions.OpenBrowserUtil;
 import org.eclipse.wst.jsdt.internal.ui.dialogs.OptionalMessageDialog;
 import org.eclipse.wst.jsdt.internal.ui.javaeditor.EditorUtility;
@@ -147,25 +150,28 @@
 		//Ask if you wish to set the javadoc location for the projects (all) to 
 		//the location of the newly generated javadoc 
 		if (fStore.isFromStandard()) {
-			try {
-
-				URL newURL= fDestination.toFile().toURL();
-				List projs= new ArrayList();
-				//get javadoc locations for all projects
-				for (int i= 0; i < checkedProjects.length; i++) {
-					IJavaScriptProject curr= checkedProjects[i];
-					URL currURL= JavaScriptUI.getProjectJSdocLocation(curr);
-					if (!newURL.equals(currURL)) { // currURL can be null
+			URI newURI= fDestination.toFile().toURI();
+			List<IJavaScriptProject> projs= new ArrayList<IJavaScriptProject>();
+			//get javadoc locations for all projects
+			for (int i= 0; i < checkedProjects.length; i++) {
+				IJavaScriptProject curr= checkedProjects[i];
+				try {
+					URI currURI = JavaScriptUI.getProjectJSdocLocation(curr).toURI();
+					if (!newURI.equals(currURI)) { // currURL can be null
 						//if not all projects have the same javadoc location ask if you want to change
 						//them to have the same javadoc location
 						projs.add(curr);
 					}
+				} catch (URISyntaxException ex) {
+					JavaScriptPlugin.log(ex);
 				}
-				if (!projs.isEmpty()) {
-					setAllJavadocLocations((IJavaScriptProject[]) projs.toArray(new IJavaScriptProject[projs.size()]), newURL);
+			}
+			if (!projs.isEmpty()) {
+				try {
+					setAllJavadocLocations(projs.toArray(new IJavaScriptProject[projs.size()]), newURI.toURL());
+				} catch (MalformedURLException e) {
+					JavaScriptPlugin.log(e);
 				}
-			} catch (MalformedURLException e) {
-				JavaScriptPlugin.log(e);
 			}
 		}
 
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
index 60f315e..c6a1a50 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mickael Istria (Red Hat Inc.) - 426209 Java 6 + Warnings cleanup
  *******************************************************************************/
 package org.eclipse.wst.jsdt.internal.ui.preferences;
 
@@ -197,7 +198,8 @@
 	public boolean performOk() {
 		if (fJavadocConfigurationBlock != null) {
 			URL javadocLocation= fJavadocConfigurationBlock.getJavadocLocation();
-			if (javadocLocation == null && fInitalLocation == null || javadocLocation != null && javadocLocation.equals(fInitalLocation)) {
+			if ((javadocLocation == null && fInitalLocation == null) ||
+				(javadocLocation != null && fInitalLocation != null && javadocLocation.toString().equals(fInitalLocation.toString()))) {
 				return true; // no change
 			}
 			
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/template/preferences/TemplateVariableProcessor.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/template/preferences/TemplateVariableProcessor.java
index 8ab4f5e..7f6a9a6 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/template/preferences/TemplateVariableProcessor.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/template/preferences/TemplateVariableProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mickael Istria (Red Hat Inc.) - 426209 Java 6 + Warnings cleanup
  *******************************************************************************/
 package org.eclipse.wst.jsdt.internal.ui.text.template.preferences;
 
@@ -28,17 +29,10 @@
 
 public class TemplateVariableProcessor implements IContentAssistProcessor {
 
-	private static Comparator fgTemplateVariableProposalComparator= new Comparator() {
-		public int compare(Object arg0, Object arg1) {
-			TemplateVariableProposal proposal0= (TemplateVariableProposal) arg0;
-			TemplateVariableProposal proposal1= (TemplateVariableProposal) arg1;
-
+	private static Comparator<TemplateVariableProposal> fgTemplateVariableProposalComparator= new Comparator<TemplateVariableProposal>() {
+		public int compare(TemplateVariableProposal proposal0, TemplateVariableProposal proposal1) {
 			return proposal0.getDisplayString().compareTo(proposal1.getDisplayString());
 		}
-
-		public boolean equals(Object arg0) {
-			return false;
-		}
 	};
 
 
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java
index 5d51d35..420e0e0 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -8,7 +8,8 @@
  * Contributors:
  *      IBM Corporation - initial API and implementation 
  * 		Sebastian Davids <sdavids@gmx.de> - Fix for bug 19346 - Dialog font
- *   	should be activated and used by other components.
+ *          should be activated and used by other components.
+ *      Mickael Istria (Red Hat Inc.) - 426209 Java 6 + Warnings cleanup
  *******************************************************************************/
 package org.eclipse.wst.jsdt.internal.ui.workingsets;
 
@@ -20,6 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
 
 import org.eclipse.core.resources.IProject;
@@ -132,10 +134,10 @@
 	private Button fDeselectAll;
 
 	private IWorkingSet[] fResult;
-	private List fAddedWorkingSets;
-	private List fRemovedWorkingSets;
-	private Map fEditedWorkingSets;
-	private List fRemovedMRUWorkingSets;
+	private List<IWorkingSet> fAddedWorkingSets;
+	private List<IWorkingSet> fRemovedWorkingSets;
+	private Map<IWorkingSet, IWorkingSet> fEditedWorkingSets;
+	private List<IWorkingSet> fRemovedMRUWorkingSets;
 
 	private int nextButtonId= IDialogConstants.CLIENT_ID + 1;
 
@@ -469,16 +471,14 @@
 	 * Rolls back changes to working sets.
 	 */
 	private void restoreChangedWorkingSets() {
-		Iterator iterator= fEditedWorkingSets.keySet().iterator();
+		for (Entry<IWorkingSet, IWorkingSet> entry : this.fEditedWorkingSets.entrySet()) {
+			IWorkingSet editedWorkingSet= entry.getKey();
+			IWorkingSet originalWorkingSet= entry.getValue();
 
-		while (iterator.hasNext()) {
-			IWorkingSet editedWorkingSet= (IWorkingSet)iterator.next();
-			IWorkingSet originalWorkingSet= (IWorkingSet)fEditedWorkingSets.get(editedWorkingSet);
-
-			if (editedWorkingSet.getName().equals(originalWorkingSet.getName()) == false) {
+			if (! editedWorkingSet.getName().equals(originalWorkingSet.getName())) {
 				editedWorkingSet.setName(originalWorkingSet.getName());
 			}
-			if (editedWorkingSet.getElements().equals(originalWorkingSet.getElements()) == false) {
+			if (! Arrays.equals(editedWorkingSet.getElements(), originalWorkingSet.getElements())) {
 				editedWorkingSet.setElements(originalWorkingSet.getElements());
 			}
 		}
diff --git a/development/org.eclipse.wst.jsdt.astview/.classpath b/development/org.eclipse.wst.jsdt.astview/.classpath
index ce73933..121e527 100644
--- a/development/org.eclipse.wst.jsdt.astview/.classpath
+++ b/development/org.eclipse.wst.jsdt.astview/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/development/org.eclipse.wst.jsdt.astview/META-INF/MANIFEST.MF b/development/org.eclipse.wst.jsdt.astview/META-INF/MANIFEST.MF
index 5f6619a..18f02b4 100644
--- a/development/org.eclipse.wst.jsdt.astview/META-INF/MANIFEST.MF
+++ b/development/org.eclipse.wst.jsdt.astview/META-INF/MANIFEST.MF
@@ -21,4 +21,4 @@
  org.eclipse.wst.jsdt.ui,
  org.eclipse.core.expressions;bundle-version="3.4.0"
 Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/development/org.eclipse.wst.jsdt.astview/build.properties b/development/org.eclipse.wst.jsdt.astview/build.properties
index 88e69c7..f7eb022 100644
--- a/development/org.eclipse.wst.jsdt.astview/build.properties
+++ b/development/org.eclipse.wst.jsdt.astview/build.properties
@@ -18,4 +18,3 @@
 
 source.. = src/
 output.. = bin/
-jre.compilation.profile = J2SE-1.4
diff --git a/development/org.eclipse.wst.jsdt.debug.chrome/.classpath b/development/org.eclipse.wst.jsdt.debug.chrome/.classpath
index 2fbb7a2..ad32c83 100644
--- a/development/org.eclipse.wst.jsdt.debug.chrome/.classpath
+++ b/development/org.eclipse.wst.jsdt.debug.chrome/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/development/org.eclipse.wst.jsdt.debug.chrome/META-INF/MANIFEST.MF b/development/org.eclipse.wst.jsdt.debug.chrome/META-INF/MANIFEST.MF
index aed305d..86890b8 100644
--- a/development/org.eclipse.wst.jsdt.debug.chrome/META-INF/MANIFEST.MF
+++ b/development/org.eclipse.wst.jsdt.debug.chrome/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.wst.jsdt.debug.core;bundle-version="3.1.0",
  org.eclipse.wst.jsdt.debug.transport;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.jsdt.debug.internal.chrome;x-internal:=true,
  org.eclipse.wst.jsdt.debug.internal.chrome.connect;x-internal:=true,
diff --git a/development/org.eclipse.wst.jsdt.debug.jsd2/.classpath b/development/org.eclipse.wst.jsdt.debug.jsd2/.classpath
index 2fbb7a2..ad32c83 100644
--- a/development/org.eclipse.wst.jsdt.debug.jsd2/.classpath
+++ b/development/org.eclipse.wst.jsdt.debug.jsd2/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/development/org.eclipse.wst.jsdt.debug.jsd2/META-INF/MANIFEST.MF b/development/org.eclipse.wst.jsdt.debug.jsd2/META-INF/MANIFEST.MF
index 758791a..820f273 100644
--- a/development/org.eclipse.wst.jsdt.debug.jsd2/META-INF/MANIFEST.MF
+++ b/development/org.eclipse.wst.jsdt.debug.jsd2/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.wst.jsdt.debug.core;bundle-version="3.1.100",
  org.eclipse.wst.jsdt.debug.transport;bundle-version="1.0.200"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %Bundle-Vendor
 Export-Package: org.eclipse.wst.jsdt.debug.internal.jsd2;x-internal:=true,
diff --git a/development/org.eclipse.wst.jsdt.debug.node/.classpath b/development/org.eclipse.wst.jsdt.debug.node/.classpath
index 2fbb7a2..ad32c83 100644
--- a/development/org.eclipse.wst.jsdt.debug.node/.classpath
+++ b/development/org.eclipse.wst.jsdt.debug.node/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/development/org.eclipse.wst.jsdt.debug.node/META-INF/MANIFEST.MF b/development/org.eclipse.wst.jsdt.debug.node/META-INF/MANIFEST.MF
index 1cae0aa..f949131 100644
--- a/development/org.eclipse.wst.jsdt.debug.node/META-INF/MANIFEST.MF
+++ b/development/org.eclipse.wst.jsdt.debug.node/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@
 Bundle-Vendor: %Bundle-Vendor
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.wst.jsdt.debug.core;bundle-version="3.1.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.jsdt.debug.internal.node;x-internal:=true,
  org.eclipse.wst.jsdt.debug.internal.node.launching;x-internal:=true
diff --git a/development/org.eclipse.wst.jsdt.jseview/.classpath b/development/org.eclipse.wst.jsdt.jseview/.classpath
index 304e861..121e527 100644
--- a/development/org.eclipse.wst.jsdt.jseview/.classpath
+++ b/development/org.eclipse.wst.jsdt.jseview/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/development/org.eclipse.wst.jsdt.jseview/META-INF/MANIFEST.MF b/development/org.eclipse.wst.jsdt.jseview/META-INF/MANIFEST.MF
index 1e40967..139cee3 100644
--- a/development/org.eclipse.wst.jsdt.jseview/META-INF/MANIFEST.MF
+++ b/development/org.eclipse.wst.jsdt.jseview/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@
 Bundle-Activator: org.eclipse.wst.jsdt.jseview.JEViewPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.3.100,4.0.0)",
diff --git a/development/org.eclipse.wst.jsdt.unittests/.classpath b/development/org.eclipse.wst.jsdt.unittests/.classpath
index 2d1a430..8a8f166 100644
--- a/development/org.eclipse.wst.jsdt.unittests/.classpath
+++ b/development/org.eclipse.wst.jsdt.unittests/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>

 <classpath>

-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>

+	<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.pde.core.requiredPlugins"/>

 	<classpathentry kind="src" path="src"/>

 	<classpathentry kind="output" path="bin"/>

diff --git a/development/org.eclipse.wst.jsdt.unittests/META-INF/MANIFEST.MF b/development/org.eclipse.wst.jsdt.unittests/META-INF/MANIFEST.MF
index 3e91ba6..0dc8789 100644
--- a/development/org.eclipse.wst.jsdt.unittests/META-INF/MANIFEST.MF
+++ b/development/org.eclipse.wst.jsdt.unittests/META-INF/MANIFEST.MF
@@ -15,5 +15,5 @@
  org.eclipse.wst.jsdt.ui,
  org.eclipse.wst.jsdt.ui.tests,
  org.junit;bundle-version=3.8.2
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath b/tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath
index ce73933..121e527 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF
index 29bfd20..7044644 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF
@@ -15,5 +15,5 @@
  org.eclipse.wst.jsdt.core.tests.interpret,
  org.eclipse.wst.jsdt.core.tests.junit.extension,
  org.eclipse.wst.jsdt.core.tests.util
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/.classpath b/tests/org.eclipse.wst.jsdt.core.tests.model/.classpath
index ce73933..121e527 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/.classpath
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.core.tests.model/META-INF/MANIFEST.MF
index 0f69ea2..6b764f8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/META-INF/MANIFEST.MF
@@ -22,5 +22,5 @@
  org.eclipse.text,
  org.eclipse.wst.jsdt.core
 Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Activator: org.eclipse.wst.jsdt.core.tests.internal.Activator
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RunJavaSearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RunJavaSearchTests.java
index 12c4f31..4a2472e 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RunJavaSearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RunJavaSearchTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -7,29 +7,31 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mickael Istria (Red Hat Inc.) - 426209 Java 6 + Warnings cleanup
  *******************************************************************************/
 package org.eclipse.wst.jsdt.core.tests.model;
 
-import java.lang.reflect.*;
-import java.util.*;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
-
-import org.eclipse.wst.jsdt.core.tests.junit.extension.TestCase;
+import java.util.List;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.eclipse.wst.jsdt.core.tests.junit.extension.TestCase;
+
 public class RunJavaSearchTests extends junit.framework.TestCase {
 
-	public final static List TEST_CLASSES = new ArrayList();
+	public final static List<Class<? extends TestCase>> TEST_CLASSES = new ArrayList<Class<? extends TestCase>>();
 	static {
 		TEST_CLASSES.add(JavaSearchTests.class);
 		TEST_CLASSES.add(WorkingCopySearchTests.class);
 		TEST_CLASSES.add(JavaSearchJavadocTests.class);
 	}
 
-	public static Class[] getTestClasses() {
-		return (Class[]) TEST_CLASSES.toArray();
+	public static Class<? extends TestCase>[] getTestClasses() {
+		return TEST_CLASSES.toArray(new Class[TEST_CLASSES.size()]);
 	}
 
 	public RunJavaSearchTests(String name) {
@@ -40,10 +42,10 @@
 		TestSuite ts = new TestSuite(RunJavaSearchTests.class.getName());
 
 		// Store test classes with same "JavaSearch"project
-		AbstractJavaSearchTests.JAVA_SEARCH_SUITES = new ArrayList(TEST_CLASSES);
+		AbstractJavaSearchTests.JAVA_SEARCH_SUITES = new ArrayList<Class<? extends TestCase>>(TEST_CLASSES);
 
 		// Get all classes
-		List allClasses = new ArrayList(TEST_CLASSES);
+		List<Class<? extends TestCase>> allClasses = new ArrayList<Class<? extends TestCase>>(TEST_CLASSES);
 		allClasses.add(JavaSearchBugsTests.class);
 		allClasses.add(JavaSearchMultipleProjectsTests.class);
 		allClasses.add(SearchTests.class);
@@ -57,9 +59,7 @@
 		TestCase.RUN_ONLY_ID = null;
 
 		// Add all tests suite of tests
-		for (int i = 0, size = allClasses.size(); i < size; i++) {
-			Class testClass = (Class) allClasses.get(i);
-
+		for (Class<? extends TestCase> testClass : allClasses) {
 			// call the suite() method and add the resulting suite to the suite
 			try {
 				Method suiteMethod = testClass.getDeclaredMethod("suite", new Class[0]); //$NON-NLS-1$
diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/.classpath b/tests/org.eclipse.wst.jsdt.debug.core.tests/.classpath
index 2fbb7a2..ad32c83 100644
--- a/tests/org.eclipse.wst.jsdt.debug.core.tests/.classpath
+++ b/tests/org.eclipse.wst.jsdt.debug.core.tests/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF
index 7db7285..bdce68c 100644
--- a/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,7 @@
  org.eclipse.core.resources,
  org.eclipse.debug.core,
  org.eclipse.wst.jsdt.debug.ui
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.wst.debug.core.tests;x-internal:=true,
  org.eclipse.wst.debug.core.tests.breakpoints;x-internal:=true
diff --git a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/.classpath b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/.classpath
index 2fbb7a2..ad32c83 100644
--- a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/.classpath
+++ b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<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.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF
index 9ad85d1..604745b 100644
--- a/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.jsdt.debug.rhino.tests/META-INF/MANIFEST.MF
@@ -11,6 +11,6 @@
  org.mozilla.javascript;bundle-version="1.7.2",
  org.eclipse.wst.jsdt.debug.transport,
  org.eclipse.jface.text
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: %Bundle-Vendor
 Export-Package: org.eclipse.wst.jsdt.debug.rhino.tests;x-internal:=true
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/.classpath b/tests/org.eclipse.wst.jsdt.ui.tests/.classpath
index 2d1a430..8a8f166 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/.classpath
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>

 <classpath>

-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>

+	<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.pde.core.requiredPlugins"/>

 	<classpathentry kind="src" path="src"/>

 	<classpathentry kind="output" path="bin"/>

diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.ui.tests/META-INF/MANIFEST.MF
index 23154f4..22fc1b5 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@
  org.eclipse.ui.workbench.texteditor,
  org.eclipse.ui.ide,
  org.junit;bundle-version=3.8.2
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: org.eclipse.wst.jsdt.ui.tests.internal.Activator
 Export-Package: org.eclipse.wst.jsdt.ui.tests,