updated jdt.core and tests to v_B59 ( = 3.7 RC1)
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
index a54c69f..5e777f0 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
@@ -46,7 +46,7 @@
 	// All specified tests which do not belong to the class are skipped...
 	static {
 //		TESTS_NAMES = new String[] { "test293" };
-//		TESTS_NUMBERS = new int[] { 294 };
+//		TESTS_NUMBERS = new int[] { 297 };
 //		TESTS_RANGE = new int[] { 294, -1 };
 	}
 
@@ -9789,4 +9789,45 @@
 			customOptions,
 			null);
 }
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=343621
+public void test297() {
+	Map customOptions = getCompilerOptions();
+	customOptions.put(CompilerOptions.OPTION_SuppressWarnings, CompilerOptions.ENABLED);
+	customOptions.put(CompilerOptions.OPTION_ReportUnhandledWarningToken, CompilerOptions.WARNING);
+	customOptions.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
+	customOptions.put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.WARNING);
+	customOptions.put(CompilerOptions.OPTION_ReportComparingIdentical, CompilerOptions.ERROR);
+	customOptions.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR);
+	String testFiles [] = new String[] {
+			"A.java",
+			"public class A {\n" + 
+			"	public void one() {\n" + 
+			"		@SuppressWarnings(\"unused\")\n" + 
+			"		Object object = new Object();\n" + 
+			"	}\n" + 
+			"	public void two() {\n" + 
+			"		@SuppressWarnings({ \"unchecked\", \"unused\" })\n" + 
+			"		Object object = build();\n" + 
+			"	}\n" + 
+			"	public final Object build(Class<? super Object>... objects) {\n" + 
+			"		return null;\n" + 
+			"	}\n" + 
+			"	public boolean bar() {\n" +
+			"		int i = 0;\n" +
+			"		return i == i;\n" + 
+			"	}\n" + 
+			"}"
+	};
+	runNegativeTest(
+			testFiles,
+			"----------\n" + 
+			"1. ERROR in A.java (at line 15)\n" + 
+			"	return i == i;\n" + 
+			"	       ^^^^^^\n" + 
+			"Comparing identical expressions\n" + 
+			"----------\n",
+			null,
+			true,
+			customOptions);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProgrammingProblemsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProgrammingProblemsTest.java
index fa8de95..0a438cc 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProgrammingProblemsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProgrammingProblemsTest.java
@@ -2355,7 +2355,9 @@
 		null);
 }
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=336648
-public void test0058() {
+public void _test0058() {
+	if (this.complianceLevel < ClassFileConstants.JDK1_5)
+		return;
 	Map customOptions = getCompilerOptions();
 	customOptions.put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.WARNING);
 	this.runNegativeTest(
@@ -2375,7 +2377,12 @@
 				"}\n"
 			},
 			"----------\n" + 
-			"1. ERROR in X.java (at line 7)\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	final String message= m;\n" + 
+			"	             ^^^^^^^\n" + 
+			"The value of the local variable message is not used\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
 			"	bug(); // undefined method\n" + 
 			"	^^^\n" + 
 			"The method bug() is undefined for the type new Runnable(){}\n" + 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java
index 12547df..a129c83 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 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
@@ -10,11 +10,14 @@
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.eval;
 
+import java.util.Map;
+
 import junit.framework.Test;
 
 import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
 import org.eclipse.jdt.internal.eval.EvaluationResult;
 import org.eclipse.jdt.internal.eval.IRequestor;
@@ -43,6 +46,19 @@
 public static Test suite() {
 	return setupSuite(testClass());
 }
+public Map getCompilerOptions() {
+	Map defaultOptions = super.getCompilerOptions();
+	defaultOptions.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.DO_NOT_GENERATE);
+	defaultOptions.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.DO_NOT_GENERATE);
+	defaultOptions.put(CompilerOptions.OPTION_SourceFileAttribute, CompilerOptions.DO_NOT_GENERATE);
+	defaultOptions.put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.WARNING);
+	defaultOptions.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
+	defaultOptions.put(CompilerOptions.OPTION_ReportUnusedParameter, CompilerOptions.WARNING);
+	defaultOptions.put(CompilerOptions.OPTION_ReportLocalVariableHiding, CompilerOptions.WARNING);
+	defaultOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE);
+	defaultOptions.put(CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment, CompilerOptions.WARNING);
+	return defaultOptions;
+}
 /**
  * Tests code snippet that throws a checked exception.
  * (Regression test for 1G0T5XK)
@@ -893,4 +909,22 @@
 		this.context.setImports(new char[0][]);
 	}
 }
+/**
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=345334
+ */
+public void testBug345334() {
+	Map options = getCompilerOptions();
+	if (this.complianceLevel == ClassFileConstants.JDK1_5) {
+		options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, CompilerOptions.ERROR);
+	} else if (this.complianceLevel >= ClassFileConstants.JDK1_6) {
+		options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, CompilerOptions.ERROR);
+		options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation, CompilerOptions.ERROR);
+	}
+	evaluateWithExpectedDisplayString(
+			options,
+			buildCharArray(new String[] {
+			"return \"SUCCESS\";\n",
+			}),
+			"SUCCESS".toCharArray());
+}
 }