Update jdt.core to I20150129-1830 (M5)
diff --git a/org.eclipse.jdt.core.tests.compiler/.classpath b/org.eclipse.jdt.core.tests.compiler/.classpath
index b7464f3..deb6736 100644
--- a/org.eclipse.jdt.core.tests.compiler/.classpath
+++ b/org.eclipse.jdt.core.tests.compiler/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<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/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="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
index 99c1d4a..42f4a82 100644
--- a/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,3 @@
-#Wed Feb 02 12:03:05 EST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -8,17 +7,23 @@
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -27,7 +32,8 @@
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -35,6 +41,7 @@
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
@@ -45,7 +52,9 @@
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
@@ -60,20 +69,33 @@
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
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.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
@@ -84,16 +106,19 @@
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+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.3
+org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
index c0ded89..5ec0d11 100644
--- a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
@@ -23,7 +23,8 @@
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
org.eclipse.objectteams.otdt
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Import-Package: org.eclipse.jdt.internal.compiler.apt.dispatch
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-BundleShape: dir
Bundle-Activator: org.eclipse.jdt.core.tests.compiler.Activator
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/Activator.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/Activator.java
index 1ccad23..eecc2f1 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/Activator.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/Activator.java
@@ -21,6 +21,7 @@
*
* @deprecated uses deprecated class PackageAdmin.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Activator extends Plugin {
private static final String PLUGIN_ID = "org.eclipse.jdt.core.tests.compiler";
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java
index a3eb21f..2b83e58 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.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
@@ -19,6 +19,7 @@
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AnnotationCompletionParserTest extends AbstractCompletionTest {
public AnnotationCompletionParserTest(String testName) {
super(testName);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java
index 6e8ba36..0ed2893 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -33,6 +33,7 @@
// This test suite test the first implementation of the annotation recovery.
// Tests must be updated with annotation recovery improvment
// TODO(david) update test suite
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AnnotationDietRecoveryTest extends AbstractCompilerTest {
private static final boolean CHECK_ALL_PARSE = true;
public static boolean optimizeStringLiterals = false;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
index 01342ad..cd7e549 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
@@ -17,6 +17,7 @@
import org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+@SuppressWarnings({ "rawtypes" })
public class ComplianceDiagnoseTest extends AbstractRegressionTest {
public ComplianceDiagnoseTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java
index 387dee7..cbae11d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -8210,4 +8210,73 @@
expectedFullUnitToString,
expectedCompletionDietUnitToString, testName);
}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=456861 - [recovery] NPE in RecoveryScanner since Mars M4
+public void test456861() {
+ String s =
+ "import java.awt.Point;\n" +
+ "public class Test {\n" +
+ " public void foo(Point p, int[] a) {\n" +
+ " String s1 = \"\";\n" +
+ " s.;\n" +
+ " }\n" +
+ " }";
+
+ String expectedDietUnitToString =
+ "import java.awt.Point;\n" +
+ "public class Test {\n" +
+ " public Test() {\n" +
+ " }\n" +
+ " public void foo(Point p, int[] a) {\n" +
+ " }\n" +
+ "}\n";
+
+ String expectedDietPlusBodyUnitToString =
+ "import java.awt.Point;\n" +
+ "public class Test {\n" +
+ " public Test() {\n" +
+ " super();\n" +
+ " }\n" +
+ " public void foo(Point p, int[] a) {\n" +
+ " }\n" +
+ "}\n";
+
+ String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
+ "import java.awt.Point;\n" +
+ "public class Test {\n" +
+ " public Test() {\n" +
+ " super();\n" +
+ " }\n" +
+ " public void foo(Point p, int[] a) {\n" +
+ " String s1 = \"\";\n" +
+ " s = $missing$;\n" +
+ " }\n" +
+ "}\n";
+
+ String expectedFullUnitToString =
+ "import java.awt.Point;\n" +
+ "public class Test {\n" +
+ " public Test() {\n" +
+ " }\n" +
+ " public void foo(Point p, int[] a) {\n" +
+ " }\n" +
+ "}\n";
+
+ String expectedCompletionDietUnitToString =
+ "import java.awt.Point;\n" +
+ "public class Test {\n" +
+ " public Test() {\n" +
+ " }\n" +
+ " public void foo(Point p, int[] a) {\n" +
+ " }\n" +
+ "}\n";
+
+ String testName = "test";
+ checkParse(
+ s.toCharArray(),
+ expectedDietUnitToString,
+ expectedDietPlusBodyUnitToString,
+ expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
+ expectedFullUnitToString,
+ expectedCompletionDietUnitToString, testName);
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumCompletionParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumCompletionParserTest.java
index 38f8075..5edf971 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumCompletionParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumCompletionParserTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -19,6 +19,7 @@
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class EnumCompletionParserTest extends AbstractCompletionTest {
public EnumCompletionParserTest(String testName) {
super(testName);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumDietRecoveryTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumDietRecoveryTest.java
index 54a22fa..4d7110c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumDietRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/EnumDietRecoveryTest.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
@@ -28,6 +28,7 @@
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class EnumDietRecoveryTest extends AbstractCompilerTest {
public static boolean optimizeStringLiterals = false;
public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java
index 78643fb..17e6dd6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -31,6 +31,7 @@
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class GenericDietRecoveryTest extends AbstractCompilerTest {
public static boolean optimizeStringLiterals = false;
public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java
index b40d74f..ee65400 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class GenericsCompletionParserTest extends AbstractCompletionTest {
public GenericsCompletionParserTest(String testName) {
super(testName);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
index c6833d7..d5b9190 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.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
@@ -31,6 +31,7 @@
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocCompletionParserTest extends AbstractCompletionTest implements JavadocTagConstants {
public static int INLINE_ALL_TAGS_LENGTH = 0;
public static int BLOCK_ALL_TAGS_LENGTH = 0;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/LambdaExpressionSyntaxTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/LambdaExpressionSyntaxTest.java
index 01632ce..4ba1dad 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/LambdaExpressionSyntaxTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/LambdaExpressionSyntaxTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.core.tests.util.CompilerTestSetup;
+@SuppressWarnings({ "rawtypes" })
public class LambdaExpressionSyntaxTest extends AbstractSyntaxTreeTest {
private static String jsr335TestScratchArea = "c:\\Jsr335TestScratchArea";
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java
index fe862e9..83180aa 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ParserTest extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "test000" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest1_7.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest1_7.java
index 03177dc..ad35ad9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest1_7.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest1_7.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 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
@@ -27,6 +27,7 @@
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ParserTest1_7 extends AbstractCompilerTest {
public static final boolean ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY = false;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ReferenceExpressionSyntaxTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ReferenceExpressionSyntaxTest.java
index abe363a..fae83a6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ReferenceExpressionSyntaxTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ReferenceExpressionSyntaxTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2013 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.core.tests.util.CompilerTestSetup;
+@SuppressWarnings({ "rawtypes" })
public class ReferenceExpressionSyntaxTest extends AbstractSyntaxTreeTest {
private static String jsr335TestScratchArea = "c:\\Jsr335TestScratchArea";
@@ -976,4 +977,4 @@
public void test385374a() throws IOException {
// Nop.
}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java
index 6bd2e3b..0ae8f4d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -20,6 +20,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class RunCompletionParserTests extends junit.framework.TestCase {
public final static List TEST_CLASSES = new ArrayList();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionJavadocTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionJavadocTest.java
index 44d05e8..6b3ba3b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionJavadocTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionJavadocTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -41,6 +41,7 @@
* Class to test selection in Javadoc comments.
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=54968"
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SelectionJavadocTest extends AbstractSelectionTest {
String source;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SingleCompletionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SingleCompletionTest.java
index ad8d272..494cf32 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SingleCompletionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SingleCompletionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 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
@@ -17,6 +17,7 @@
/**
* Only 1 test should be in this class
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SingleCompletionTest extends AbstractCompletionTest {
/**
* SingleCompletionTest constructor comment.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SourceElementParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SourceElementParserTest.java
index 34f0a53..d21cb55 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SourceElementParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SourceElementParserTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -30,6 +30,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SourceElementParserTest extends AbstractCompilerTest implements ISourceElementRequestor {
private SourceType currentType;
private SourceMethod currentMethod;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/StatementRecoveryTest_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/StatementRecoveryTest_1_5.java
index a6b8192..378c62a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/StatementRecoveryTest_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/StatementRecoveryTest_1_5.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -28,6 +28,7 @@
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class StatementRecoveryTest_1_5 extends AbstractCompilerTest {
public static final boolean ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY = false;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
index 593dc52..2b6415c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -23,6 +23,7 @@
/**
* Run all parser regression tests
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TestAll extends junit.framework.TestCase {
public final static List TEST_CLASSES_1_5 = new ArrayList();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TypeAnnotationSyntaxTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TypeAnnotationSyntaxTest.java
index 2984a4f..4856592 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TypeAnnotationSyntaxTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TypeAnnotationSyntaxTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2013 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -38,6 +38,7 @@
import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TypeAnnotationSyntaxTest extends AbstractSyntaxTreeTest {
private static String jsr308TestScratchArea = "c:\\Jsr308TestScratchArea";
@@ -220,7 +221,12 @@
System.out.println(f.getCanonicalPath());
char [] contents = new char[(int) f.length()];
FileInputStream fs = new FileInputStream(f);
- InputStreamReader isr = new InputStreamReader(fs);
+ InputStreamReader isr = null;
+ try {
+ isr = new InputStreamReader(fs);
+ } finally {
+ if (isr != null) isr.close();
+ }
isr.read(contents);
checkParse(contents, null, f.getCanonicalPath(), null);
}
@@ -3789,4 +3795,36 @@
"}\n";
checkParse(CHECK_PARSER, source.toCharArray(), null, "test0137", expectedUnitToString);
}
+// Support for annotations on ellipsis in lambda expression
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=432574
+public void test0139() throws IOException {
+ String source =
+ "import java.lang.annotation.ElementType;\n" +
+ "import java.lang.annotation.Target;\n" +
+ "public class X {\n" +
+ " FI fi = (String @T1[] @T1... x) -> {};\n" +
+ "}\n" +
+ "interface FI {\n" +
+ " void foo(String[]... x);\n" +
+ "}\n" +
+ "@Target(ElementType.TYPE_USE)\n" +
+ "@interface T1 {\n" +
+ "}\n";
+ String expectedUnitToString =
+ "import java.lang.annotation.ElementType;\n" +
+ "import java.lang.annotation.Target;\n" +
+ "public class X {\n" +
+ " FI fi = (String @T1 [] @T1 ... x) -> {\n" +
+ " };\n" +
+ " public X() {\n" +
+ " super();\n" +
+ " }\n" +
+ "}\n" +
+ "interface FI {\n" +
+ " void foo(String[]... x);\n" +
+ "}\n" +
+ "@Target(ElementType.TYPE_USE) @interface T1 {\n" +
+ "}\n";
+ checkParse(CHECK_PARSER, source.toCharArray(), null, "test0139", expectedUnitToString);
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ASTImplTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ASTImplTests.java
index 8afb304..27939a9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ASTImplTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ASTImplTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -44,6 +44,7 @@
* A tests series especially meant to validate the internals of our AST
* implementation.
*/
+@SuppressWarnings({ "rawtypes" })
public class ASTImplTests extends AbstractRegressionTest {
public ASTImplTests(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractComparableTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractComparableTest.java
index 61a20b6..3931ddb 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractComparableTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractComparableTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -16,6 +16,7 @@
import junit.framework.Test;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AbstractComparableTest extends AbstractRegressionTest {
protected static final String GOOGLE_INJECT_NAME = "com/google/inject/Inject.java";
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractNullAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractNullAnnotationTest.java
index 98bd7aa..fc702c2 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractNullAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractNullAnnotationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 GK Software AG and others.
+ * Copyright (c) 2010, 2014 GK Software AG 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
@@ -18,6 +18,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.osgi.framework.Bundle;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public abstract class AbstractNullAnnotationTest extends AbstractComparableTest {
// class libraries including our default null annotation types:
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
index f0968d9..2a0d236 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Technical University Berlin - adapted for Object Teams
@@ -40,8 +40,15 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.Set;
import java.util.StringTokenizer;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Processor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.element.TypeElement;
+
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -59,22 +66,31 @@
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
import org.eclipse.jdt.core.util.ClassFormatException;
import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.AbstractAnnotationProcessorManager;
import org.eclipse.jdt.internal.compiler.Compiler;
import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
import org.eclipse.jdt.internal.compiler.IProblemFactory;
+import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager;
+import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseProcessingEnvImpl;
+import org.eclipse.jdt.internal.compiler.apt.dispatch.ProcessorInfo;
+import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
import org.eclipse.jdt.internal.compiler.batch.FileSystem;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.eclipse.jdt.internal.core.search.JavaSearchParticipant;
import org.eclipse.jdt.internal.core.search.indexing.BinaryIndexer;
import org.osgi.framework.Bundle;
+
import java.util.regex.Pattern;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public abstract class AbstractRegressionTest extends AbstractCompilerTest implements StopableTestCase {
// javac comparison related types, fields and methods - see runJavac for
@@ -2462,6 +2478,9 @@
}
}
};
+ if (this.enableAPT) {
+ batchCompiler.annotationProcessorManager = getAnnotationProcessorManager(batchCompiler);
+ }
compilerOptions.produceReferenceInfo = true;
Throwable exception = null;
try {
@@ -2573,6 +2592,72 @@
javacTestOptions, vmArguments);
}
}
+
+ class DummyAnnotationProcessingManager extends BaseAnnotationProcessorManager {
+
+ ProcessorInfo processorInfo = null;
+ public ProcessorInfo discoverNextProcessor() {
+ ProcessorInfo temp = this.processorInfo;
+ this.processorInfo = null;
+ return temp;
+ }
+
+ public void reportProcessorException(Processor p, Exception e) {
+ throw new AbortCompilation(null, e);
+ }
+
+ @Override
+ public void setProcessors(Object[] processors) {
+ // Nothing to do here
+ }
+
+ @Override
+ public void configure(Object batchCompiler, String[] options) {
+ this._processingEnv = new DummyEnvironmentImpl((Compiler) batchCompiler);
+ }
+ public void processAnnotations(CompilationUnitDeclaration[] units, ReferenceBinding[] referenceBindings, boolean isLastRound) {
+ if (this.processorInfo == null) {
+ this.processorInfo = new ProcessorInfo(new DummyProcessor());
+ }
+ super.processAnnotations(units, referenceBindings, isLastRound);
+ }
+
+ @Override
+ public void configureFromPlatform(Compiler compiler, Object compilationUnitLocator, Object javaProject) {
+ // Nothing to do here
+ }
+ @SupportedAnnotationTypes("*")
+ class DummyProcessor extends AbstractProcessor {
+ @Override
+ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ return true;
+ }
+ }
+
+ class DummyEnvironmentImpl extends BaseProcessingEnvImpl {
+ public DummyEnvironmentImpl(Compiler compiler) {
+ this._compiler = compiler;
+ }
+ @Override
+ public Locale getLocale() {
+ return Locale.getDefault();
+ }
+ }
+ }
+
+ protected AbstractAnnotationProcessorManager getAnnotationProcessorManager(Compiler compiler) {
+ try {
+ AbstractAnnotationProcessorManager annotationManager = new DummyAnnotationProcessingManager();
+ annotationManager.configure(compiler, new String[0]);
+ annotationManager.setErr(new PrintWriter(System.err));
+ annotationManager.setOut(new PrintWriter(System.out));
+ return annotationManager;
+ } catch(UnsupportedClassVersionError e) {
+ System.err.println(e);
+ }
+ return null;
+ }
+
//{ObjectTeams: new hooks:
protected TestVerifier getTestVerifier(boolean reuseVM) {
return new TestVerifier(reuseVM);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java
index 306c158..34aa40c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java
@@ -24,6 +24,7 @@
import junit.framework.*;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AmbiguousMethodTest extends AbstractComparableTest {
static {
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 febf069..c2246c4 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
@@ -50,6 +50,7 @@
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AnnotationTest extends AbstractComparableTest {
// Static initializer to specify tests subset using TESTS_* static variables
@@ -11265,10 +11266,9 @@
if (this.complianceLevel < ClassFileConstants.JDK1_5) {
return;
}
- this.runNegativeTest(
- new String[] {
+ String[] src = new String[] {
"p/package-info.java",
- "@PackageAnnot(\"p\")\n" +
+ "@PackageAnnot(\"p123456\")\n" +
"package p;\n" +
"import java.lang.annotation.ElementType;\n" +
"import java.lang.annotation.Target;\n" +
@@ -11276,18 +11276,58 @@
"@interface PackageAnnot {\n" +
" String value();\n" +
"}\n"
- },
- "----------\n" +
- "1. ERROR in p\\package-info.java (at line 1)\n" +
- " @PackageAnnot(\"p\")\n" +
- " ^^^^^^^^^^^^^\n" +
- "The annotation @PackageAnnot is disallowed for this location\n" +
- "----------\n",
- null,
- true,
- null,
- true, // generate output
- false,
- false);
+ };
+ this.runNegativeTest(
+ src,
+ "----------\n" +
+ "1. ERROR in p\\package-info.java (at line 1)\n" +
+ " @PackageAnnot(\"p123456\")\n" +
+ " ^^^^^^^^^^^^^\n" +
+ "The annotation @PackageAnnot is disallowed for this location\n" +
+ "----------\n",
+ null,
+ true,
+ null,
+ true, // generate output
+ false,
+ false);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=449330 - [1.6]Eclipse compiler doesn't compile annotations in class files
+public void _test449330() throws Exception {
+ String[] testFiles = new String[] {
+ "p/X.java",
+ "package p;\n" +
+ "@java.lang.annotation.Target(value={java.lang.annotation.ElementType.TYPE})\n" +
+ "@interface X { public java.lang.String name(); }\n",
+ "p/package-info.java",
+ "@X(name=\"HELLO\")\n" +
+ "package p;\n"
+ };
+ if (this.complianceLevel <= ClassFileConstants.JDK1_6) {
+ this.runConformTest(testFiles, "");
+ checkDisassembledClassFile(OUTPUT_DIR + File.separator + "p/package-info.class", "", "HELLO");
+ } else {
+ this.runNegativeTest(testFiles,
+ "----------\n" +
+ "1. ERROR in p\\package-info.java (at line 1)\n" +
+ " @X(name=\"HELLO\")\n" +
+ " ^^\n" +
+ "The annotation @X is disallowed for this location\n" +
+ "----------\n");
}
}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=449330 - [1.6]Eclipse compiler doesn't compile annotations in class files
+// Annotation target not set
+public void _test449330a() throws Exception {
+ String[] testFiles = new String[] {
+ "p/X.java",
+ "package p;\n" +
+ "@interface X { public java.lang.String name(); }\n",
+ "p/package-info.java",
+ "@X(name=\"HELLO\")\n" +
+ "package p;\n"
+ };
+ this.runConformTest(testFiles, "");
+ checkDisassembledClassFile(OUTPUT_DIR + File.separator + "p/package-info.class", "", "HELLO");
+}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java
index c8a3131..8303bd3 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -23,6 +23,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ArrayTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java
index 9bc978c..093c06a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java
@@ -14,6 +14,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class AssertionTest extends AbstractRegressionTest {
// Static initializer to specify tests subset using TESTS_* static variables
// All specified tests which does not belong to the class are skipped...
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
index b336674..ed8ec35 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -21,6 +21,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AssignmentTest extends AbstractRegressionTest {
public AssignmentTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_5.java
index e58a4b7..ae90b2d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_5.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -16,6 +16,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AssignmentTest_1_5 extends AbstractRegressionTest {
public AssignmentTest_1_5(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_7.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_7.java
index 929de6e..be06cb4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_7.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest_1_7.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -16,6 +16,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AssignmentTest_1_7 extends AbstractRegressionTest {
public AssignmentTest_1_7(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java
index 647fbd3..2ebb3a3 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -21,6 +21,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AutoBoxingTest extends AbstractComparableTest {
public AutoBoxingTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
index 444f2b8..3ad09f8 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
@@ -57,6 +57,7 @@
import org.eclipse.jdt.internal.compiler.batch.Main;
import org.eclipse.jdt.internal.compiler.util.ManifestAnalyzer;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class BatchCompilerTest extends AbstractRegressionTest {
public static final String OUTPUT_DIR_PLACEHOLDER = "---OUTPUT_DIR_PLACEHOLDER---";
public static final String LIB_DIR_PLACEHOLDER = "---LIB_DIR_PLACEHOLDER---";
@@ -1680,7 +1681,7 @@
" -O optimize for execution time (ignored)\n" +
"\n";
String expandedExpectedOutput =
- MessageFormat.format(expectedOutput, new String[] {
+ MessageFormat.format(expectedOutput, new Object[] {
MAIN.bind("compiler.name"),
MAIN.bind("compiler.version"),
MAIN.bind("compiler.copyright")
@@ -1733,16 +1734,15 @@
" ambiguousbinding + ambiguous role-base bindings (OTJLD 2.3.4(a))\n" +
" ambiguouslowering + ambiguous lowering or upcast (OTJLD 2.2(f))\n" +
" assertIdentifier + ''assert'' used as identifier\n" +
-//OT:
+//OT (4x):
" basecall + base call not issued exactly once on each path\n" +
" (OTJLD 4.3(b,c))\n" +
" baseclasscycle + role involved in a baseclass-member cycle\n" +
" (OTJLD 2.1.2(b)\n" +
-//OT:
" bindingconventions + discouraged use of import / import base\n" +
" (OTJLD 2.1.2(d))\n" +
-//OT:
" bindingtosystemclass + trying to bind a role to a system class\n" +
+//:TO
" boxing autoboxing conversion\n" +
" charConcat + char[] in String concat\n" +
" compareIdentical + comparing identical expressions\n" +
@@ -1830,10 +1830,9 @@
" pkgDefaultMethod + attempt to override package-default method\n" +
" raw + usage of raw type\n" +
" resource + (pot.) unsafe usage of resource of type Closeable\n" +
-//OT:
+//OT (2x):
" roleinstantiation + unsafe instantiation of a role\n" +
" (OTJLD 2.4.1(c), 2.4.3)\n" +
-//OT:
" roletypesyntax + old style syntax for role types (dependent types)\n" +
" (OTJLD 1.2.2(b))\n" +
" semicolon unnecessary semicolon, empty statement\n" +
@@ -1885,7 +1884,7 @@
// SH}
"\n";
String expandedExpectedOutput =
- MessageFormat.format(expectedOutput, new String[] {
+ MessageFormat.format(expectedOutput, new Object[] {
MAIN.bind("compiler.name"),
MAIN.bind("compiler.version"),
MAIN.bind("compiler.copyright")
@@ -2121,7 +2120,7 @@
String normalizedExpectedLogContents =
MessageFormat.format(
expectedLogContents,
- new String[] {
+ new Object[] {
File.separator,
MAIN.bind("compiler.name"),
MAIN.bind("compiler.copyright"),
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BinaryLiteralTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BinaryLiteralTest.java
index c05fc98..28f0522 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BinaryLiteralTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BinaryLiteralTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 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
@@ -16,6 +16,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class BinaryLiteralTest extends AbstractRegressionTest {
public BinaryLiteralTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BooleanTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BooleanTest.java
index 41123a0..1032155 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BooleanTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BooleanTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -19,6 +19,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class BooleanTest extends AbstractRegressionTest {
public BooleanTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BootstrapMethodAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BootstrapMethodAttributeTest.java
index 15d6b01..0b29f96 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BootstrapMethodAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BootstrapMethodAttributeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 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
@@ -18,6 +18,7 @@
import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+@SuppressWarnings({ "rawtypes" })
public class BootstrapMethodAttributeTest extends AbstractRegressionTest {
public BootstrapMethodAttributeTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java
index 12d01da..e8e16fc 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java
@@ -23,6 +23,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class CastTest extends AbstractRegressionTest {
public CastTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CharOperationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CharOperationTest.java
index cdb9945..e3d0eed 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CharOperationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CharOperationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -14,6 +14,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class CharOperationTest extends AbstractRegressionTest {
public CharOperationTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileComparatorTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileComparatorTest.java
index 82e2eb5..04e66b7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileComparatorTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileComparatorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -18,6 +18,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
+@SuppressWarnings({ "rawtypes" })
public class ClassFileComparatorTest extends AbstractRegressionTest {
public ClassFileComparatorTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java
index 0376cf4..cf697b1 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
+@SuppressWarnings({ "rawtypes" })
public class ClassFileReaderTest_1_4 extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "test127" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_5.java
index 2a19011..581e5a4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_5.java
@@ -23,6 +23,7 @@
import org.eclipse.jdt.core.util.IClassFileReader;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+@SuppressWarnings({ "rawtypes" })
public class ClassFileReaderTest_1_5 extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "test127" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_8.java
index fde818b..a1229c6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_8.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_8.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved.
+ * Copyright (c) 2013, 2014 GoPivotal, Inc. All Rights Reserved.
* 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
@@ -23,6 +23,7 @@
import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
+@SuppressWarnings({ "rawtypes" })
public class ClassFileReaderTest_1_8 extends AbstractRegressionTest {
static {
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CollisionCase.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CollisionCase.java
index d2275bf..17ca1df 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CollisionCase.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CollisionCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -12,6 +12,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class CollisionCase extends AbstractRegressionTest {
public CollisionCase(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
index 27e2a38..ff703e0 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2014 IBM Corporation and others.
+ * Copyright (c) 2006, 2015 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
@@ -37,6 +37,7 @@
* Bug 439516 - [1.8][null] NonNullByDefault wrongly applied to implicit type bound of binary type
* Bug 438467 - [compiler][null] Better error position for "The method _ cannot implement the corresponding method _ due to incompatible nullness constraints"
* Bug 446442 - [1.8] merge null annotations from super methods
+ * Bug 458361 - [1.8][null] reconciler throws NPE in ProblemReporter.illegalReturnRedefinition()
* Jesper S Moller - Contributions for
* bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
* bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
@@ -70,6 +71,7 @@
* This class is meant to gather test cases related to the invocation of the
* compiler, be it at an API or non API level.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class CompilerInvocationTests extends AbstractRegressionTest {
public CompilerInvocationTests(String name) {
@@ -586,6 +588,7 @@
expectedProblemAttributes.put("IllegalQualifierForExplicitThis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
expectedProblemAttributes.put("IllegalQualifierForExplicitThis2", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("IllegalReturnNullityRedefinitionFreeTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
expectedProblemAttributes.put("IllegalStaticModifierForMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
@@ -1496,6 +1499,7 @@
expectedProblemAttributes.put("IllegalQualifierForExplicitThis2", SKIP);
expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("IllegalReturnNullityRedefinitionFreeTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
expectedProblemAttributes.put("IllegalStaticModifierForMemberType", SKIP);
expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess", SKIP);
expectedProblemAttributes.put("IllegalTypeArgumentsInRawConstructorReference", SKIP);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java
index 842c6fd..9afc43c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -21,6 +21,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Compliance_1_3 extends AbstractRegressionTest {
boolean docSupport = false;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java
index 85ee26a..3d99dd3 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -22,6 +22,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Compliance_1_4 extends AbstractRegressionTest {
boolean docSupport = false;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java
index a1f66a8..384bc1a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -22,6 +22,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Compliance_1_5 extends AbstractComparableTest {
boolean docSupport = false;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_6.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_6.java
index f4eb7cb..58522bc 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_6.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_6.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -16,6 +16,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Compliance_1_6 extends AbstractComparableTest {
public Compliance_1_6(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_7.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_7.java
index 218de47..1c2e0d6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_7.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_7.java
@@ -19,6 +19,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Compliance_1_7 extends AbstractComparableTest {
public Compliance_1_7(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_CLDC.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_CLDC.java
index e603803..d7542bb 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_CLDC.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_CLDC.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
@@ -18,6 +18,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Compliance_CLDC extends AbstractRegressionTest {
public Compliance_CLDC(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConcurrentBatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConcurrentBatchCompilerTest.java
index 9355e01..07841eb 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConcurrentBatchCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConcurrentBatchCompilerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 IBM Corporation GK Software AG and others.
+ * Copyright (c) 2012, 2014 IBM Corporation GK Software AG 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
@@ -20,6 +20,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ConcurrentBatchCompilerTest extends BatchCompilerTest {
public static Test suite() {
@@ -81,7 +82,7 @@
runConformTest(new String[] {
"org/eclipse/jdt/internal/launching/CompositeId.java",
"/*******************************************************************************\n" +
- " * Copyright (c) 2000, 2012 IBM Corporation and others.\n" +
+ " * Copyright (c) 2000, 2014 IBM Corporation and others.\n" +
" * All rights reserved. This program and the accompanying materials\n" +
" * are made available under the terms of the Eclipse Public License v1.0\n" +
" * which accompanies this distribution, and is available at\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConditionalExpressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConditionalExpressionTest.java
index a303be6..068cee1 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConditionalExpressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConditionalExpressionTest.java
@@ -14,6 +14,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class ConditionalExpressionTest extends AbstractRegressionTest {
public ConditionalExpressionTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java
index f63a060..e970f56 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -32,6 +32,7 @@
import org.eclipse.jdt.internal.compiler.impl.StringConstant;
import org.eclipse.jdt.internal.compiler.problem.ShouldNotImplement;
+@SuppressWarnings({ "rawtypes" })
public class ConstantTest extends AbstractRegressionTest {
public ConstantTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DebugAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DebugAttributeTest.java
index a85478e..154b06f 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DebugAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DebugAttributeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+@SuppressWarnings({ "rawtypes" })
public class DebugAttributeTest extends AbstractRegressionTest {
public DebugAttributeTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
index 563dc7c..6c71f9e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -20,6 +20,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Deprecated15Test extends AbstractRegressionTest {
public Deprecated15Test(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated18Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated18Test.java
index 340a701..feb68fe 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated18Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated18Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Deprecated18Test extends AbstractRegressionTest {
public Deprecated18Test(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java
index ab51bfc..93699b8 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java
@@ -18,6 +18,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class DeprecatedTest extends AbstractRegressionTest {
public DeprecatedTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnclosingMethodAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnclosingMethodAttributeTest.java
index 7479299..76f6d5b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnclosingMethodAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnclosingMethodAttributeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -24,6 +24,7 @@
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies;
+@SuppressWarnings({ "rawtypes" })
public class EnclosingMethodAttributeTest extends AbstractComparableTest {
public EnclosingMethodAttributeTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
index 02a2435..4e3012e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
@@ -28,6 +28,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class EnumTest extends AbstractComparableTest {
String reportMissingJavadocComments = null;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExpressionContextTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExpressionContextTests.java
index 8248d78..5907976 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExpressionContextTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExpressionContextTests.java
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ExpressionContextTests extends AbstractRegressionTest {
static {
@@ -651,4 +652,4 @@
public static Class testClass() {
return ExpressionContextTests.class;
}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java
index acb3e79..d73c35a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ExternalizeStringLiterals15Test extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
index 73cd6c1..ec33f60 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -17,6 +17,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ExternalizeStringLiteralsTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FieldAccessTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FieldAccessTest.java
index 16aa322..d8afbee 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FieldAccessTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FieldAccessTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class FieldAccessTest extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "test000" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
index e521892..a6d3fe7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -31,6 +31,7 @@
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class FlowAnalysisTest extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "testBug380313" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest8.java
index 0d3d077..1961639 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest8.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest8.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 GK Software AG and others.
+ * Copyright (c) 2013, 2014 GK Software AG 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.core.JavaCore;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class FlowAnalysisTest8 extends AbstractNullAnnotationTest {
//Static initializer to specify tests subset using TESTS_* static variables
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForStatementTest.java
index 6da47d6..8c73523 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForStatementTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForStatementTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -20,6 +20,7 @@
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ForStatementTest extends AbstractRegressionTest {
public ForStatementTest(String name) {
@@ -272,6 +273,1511 @@
assertEquals("Wrong contents", expectedOutput, result);
}
}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test006() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " int[][][] intArray = new int[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " intArray[i][j][k] = on ? 0 : 1;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+
+ String expectedOutput =
+ " public void show();\n" +
+ " 0 ldc <String \"\"> [15]\n" +
+ " 2 astore_1 [s1]\n" +
+ " 3 ldc <String \"\"> [15]\n" +
+ " 5 astore_2 [s2]\n" +
+ " 6 ldc <String \"\"> [15]\n" +
+ " 8 astore_3 [s3]\n" +
+ " 9 ldc <String \"\"> [15]\n" +
+ " 11 astore 4 [s4]\n" +
+ " 13 ldc <String \"\"> [15]\n" +
+ " 15 astore 5 [s5]\n" +
+ " 17 ldc <String \"\"> [15]\n" +
+ " 19 astore 6 [s6]\n" +
+ " 21 ldc <String \"\"> [15]\n" +
+ " 23 astore 7 [s7]\n" +
+ " 25 ldc <String \"\"> [15]\n" +
+ " 27 astore 8 [s8]\n" +
+ " 29 ldc <String \"\"> [15]\n" +
+ " 31 astore 9 [s9]\n" +
+ " 33 ldc <String \"\"> [15]\n" +
+ " 35 astore 10 [s10]\n" +
+ " 37 ldc <String \"\"> [15]\n" +
+ " 39 astore 11 [s11]\n" +
+ " 41 ldc <String \"\"> [15]\n" +
+ " 43 astore 12 [s12]\n" +
+ " 45 ldc <String \"\"> [15]\n" +
+ " 47 astore 13 [s13]\n" +
+ " 49 ldc <String \"\"> [15]\n" +
+ " 51 astore 14 [s14]\n" +
+ " 53 ldc <String \"\"> [15]\n" +
+ " 55 astore 15 [s15]\n" +
+ " 57 ldc <String \"\"> [15]\n" +
+ " 59 astore 16 [s16]\n" +
+ " 61 ldc <String \"\"> [15]\n" +
+ " 63 astore 17 [s17]\n" +
+ " 65 ldc <String \"\"> [15]\n" +
+ " 67 astore 18 [s18]\n" +
+ " 69 ldc <String \"\"> [15]\n" +
+ " 71 astore 19 [s19]\n" +
+ " 73 ldc <String \"\"> [15]\n" +
+ " 75 astore 20 [s20]\n" +
+ " 77 ldc <String \"\"> [15]\n" +
+ " 79 astore 21 [s21]\n" +
+ " 81 ldc <String \"\"> [15]\n" +
+ " 83 astore 22 [s22]\n" +
+ " 85 ldc <String \"\"> [15]\n" +
+ " 87 astore 23 [s23]\n" +
+ " 89 ldc <String \"\"> [15]\n" +
+ " 91 astore 24 [s24]\n" +
+ " 93 ldc <String \"\"> [15]\n" +
+ " 95 astore 25 [s25]\n" +
+ " 97 ldc <String \"\"> [15]\n" +
+ " 99 astore 26 [s26]\n" +
+ " 101 ldc <String \"\"> [15]\n" +
+ " 103 astore 27 [s27]\n" +
+ " 105 ldc <String \"\"> [15]\n" +
+ " 107 astore 28 [s28]\n" +
+ " 109 ldc <String \"\"> [15]\n" +
+ " 111 astore 29 [s29]\n" +
+ " 113 ldc <String \"\"> [15]\n" +
+ " 115 astore 30 [s30]\n" +
+ " 117 ldc <String \"\"> [15]\n" +
+ " 119 astore 31 [s31]\n" +
+ " 121 ldc <String \"\"> [15]\n" +
+ " 123 astore 32 [s32]\n" +
+ " 125 ldc <String \"\"> [15]\n" +
+ " 127 astore 33 [s33]\n" +
+ " 129 ldc <String \"\"> [15]\n" +
+ " 131 astore 34 [s34]\n" +
+ " 133 ldc <String \"\"> [15]\n" +
+ " 135 astore 35 [s35]\n" +
+ " 137 ldc <String \"\"> [15]\n" +
+ " 139 astore 36 [s36]\n" +
+ " 141 ldc <String \"\"> [15]\n" +
+ " 143 astore 37 [s37]\n" +
+ " 145 ldc <String \"\"> [15]\n" +
+ " 147 astore 38 [s38]\n" +
+ " 149 ldc <String \"\"> [15]\n" +
+ " 151 astore 39 [s39]\n" +
+ " 153 ldc <String \"\"> [15]\n" +
+ " 155 astore 40 [s40]\n" +
+ " 157 ldc <String \"\"> [15]\n" +
+ " 159 astore 41 [s41]\n" +
+ " 161 ldc <String \"\"> [15]\n" +
+ " 163 astore 42 [s42]\n" +
+ " 165 ldc <String \"\"> [15]\n" +
+ " 167 astore 43 [s43]\n" +
+ " 169 ldc <String \"\"> [15]\n" +
+ " 171 astore 44 [s44]\n" +
+ " 173 ldc <String \"\"> [15]\n" +
+ " 175 astore 45 [s45]\n" +
+ " 177 ldc <String \"\"> [15]\n" +
+ " 179 astore 46 [s46]\n" +
+ " 181 ldc <String \"\"> [15]\n" +
+ " 183 astore 47 [s47]\n" +
+ " 185 ldc <String \"\"> [15]\n" +
+ " 187 astore 48 [s48]\n" +
+ " 189 ldc <String \"\"> [15]\n" +
+ " 191 astore 49 [s49]\n" +
+ " 193 ldc <String \"\"> [15]\n" +
+ " 195 astore 50 [s50]\n" +
+ " 197 ldc <String \"\"> [15]\n" +
+ " 199 astore 51 [s51]\n" +
+ " 201 ldc <String \"\"> [15]\n" +
+ " 203 astore 52 [s52]\n" +
+ " 205 ldc <String \"\"> [15]\n" +
+ " 207 astore 53 [s53]\n" +
+ " 209 ldc <String \"\"> [15]\n" +
+ " 211 astore 54 [s54]\n" +
+ " 213 ldc <String \"\"> [15]\n" +
+ " 215 astore 55 [s55]\n" +
+ " 217 ldc <String \"\"> [15]\n" +
+ " 219 astore 56 [s56]\n" +
+ " 221 ldc <String \"\"> [15]\n" +
+ " 223 astore 57 [s57]\n" +
+ " 225 ldc <String \"\"> [15]\n" +
+ " 227 astore 58 [s58]\n" +
+ " 229 ldc <String \"\"> [15]\n" +
+ " 231 astore 59 [s59]\n" +
+ " 233 ldc <String \"\"> [15]\n" +
+ " 235 astore 60 [s60]\n" +
+ " 237 ldc <String \"\"> [15]\n" +
+ " 239 astore 61 [s61]\n" +
+ " 241 ldc <String \"\"> [15]\n" +
+ " 243 astore 62 [s62]\n" +
+ " 245 ldc <String \"\"> [15]\n" +
+ " 247 astore 63 [s63]\n" +
+ " 249 ldc <String \"\"> [15]\n" +
+ " 251 astore 64 [s64]\n" +
+ " 253 ldc <String \"\"> [15]\n" +
+ " 255 astore 65 [s65]\n" +
+ " 257 ldc <String \"\"> [15]\n" +
+ " 259 astore 66 [s66]\n" +
+ " 261 ldc <String \"\"> [15]\n" +
+ " 263 astore 67 [s67]\n" +
+ " 265 ldc <String \"\"> [15]\n" +
+ " 267 astore 68 [s68]\n" +
+ " 269 ldc <String \"\"> [15]\n" +
+ " 271 astore 69 [s69]\n" +
+ " 273 ldc <String \"\"> [15]\n" +
+ " 275 astore 70 [s70]\n" +
+ " 277 ldc <String \"\"> [15]\n" +
+ " 279 astore 71 [s71]\n" +
+ " 281 ldc <String \"\"> [15]\n" +
+ " 283 astore 72 [s72]\n" +
+ " 285 ldc <String \"\"> [15]\n" +
+ " 287 astore 73 [s73]\n" +
+ " 289 ldc <String \"\"> [15]\n" +
+ " 291 astore 74 [s74]\n" +
+ " 293 ldc <String \"\"> [15]\n" +
+ " 295 astore 75 [s75]\n" +
+ " 297 ldc <String \"\"> [15]\n" +
+ " 299 astore 76 [s76]\n" +
+ " 301 ldc <String \"\"> [15]\n" +
+ " 303 astore 77 [s77]\n" +
+ " 305 ldc <String \"\"> [15]\n" +
+ " 307 astore 78 [s78]\n" +
+ " 309 ldc <String \"\"> [15]\n" +
+ " 311 astore 79 [s79]\n" +
+ " 313 ldc <String \"\"> [15]\n" +
+ " 315 astore 80 [s80]\n" +
+ " 317 ldc <String \"\"> [15]\n" +
+ " 319 astore 81 [s81]\n" +
+ " 321 ldc <String \"\"> [15]\n" +
+ " 323 astore 82 [s82]\n" +
+ " 325 ldc <String \"\"> [15]\n" +
+ " 327 astore 83 [s83]\n" +
+ " 329 ldc <String \"\"> [15]\n" +
+ " 331 astore 84 [s84]\n" +
+ " 333 ldc <String \"\"> [15]\n" +
+ " 335 astore 85 [s85]\n" +
+ " 337 ldc <String \"\"> [15]\n" +
+ " 339 astore 86 [s86]\n" +
+ " 341 ldc <String \"\"> [15]\n" +
+ " 343 astore 87 [s87]\n" +
+ " 345 ldc <String \"\"> [15]\n" +
+ " 347 astore 88 [s88]\n" +
+ " 349 ldc <String \"\"> [15]\n" +
+ " 351 astore 89 [s89]\n" +
+ " 353 ldc <String \"\"> [15]\n" +
+ " 355 astore 90 [s90]\n" +
+ " 357 ldc <String \"\"> [15]\n" +
+ " 359 astore 91 [s91]\n" +
+ " 361 ldc <String \"\"> [15]\n" +
+ " 363 astore 92 [s92]\n" +
+ " 365 ldc <String \"\"> [15]\n" +
+ " 367 astore 93 [s93]\n" +
+ " 369 ldc <String \"\"> [15]\n" +
+ " 371 astore 94 [s94]\n" +
+ " 373 ldc <String \"\"> [15]\n" +
+ " 375 astore 95 [s95]\n" +
+ " 377 ldc <String \"\"> [15]\n" +
+ " 379 astore 96 [s96]\n" +
+ " 381 ldc <String \"\"> [15]\n" +
+ " 383 astore 97 [s97]\n" +
+ " 385 ldc <String \"\"> [15]\n" +
+ " 387 astore 98 [s98]\n" +
+ " 389 ldc <String \"\"> [15]\n" +
+ " 391 astore 99 [s99]\n" +
+ " 393 ldc <String \"\"> [15]\n" +
+ " 395 astore 100 [s100]\n" +
+ " 397 ldc <String \"\"> [15]\n" +
+ " 399 astore 101 [s101]\n" +
+ " 401 ldc <String \"\"> [15]\n" +
+ " 403 astore 102 [s102]\n" +
+ " 405 ldc <String \"\"> [15]\n" +
+ " 407 astore 103 [s103]\n" +
+ " 409 ldc <String \"\"> [15]\n" +
+ " 411 astore 104 [s104]\n" +
+ " 413 ldc <String \"\"> [15]\n" +
+ " 415 astore 105 [s105]\n" +
+ " 417 ldc <String \"\"> [15]\n" +
+ " 419 astore 106 [s106]\n" +
+ " 421 ldc <String \"\"> [15]\n" +
+ " 423 astore 107 [s107]\n" +
+ " 425 ldc <String \"\"> [15]\n" +
+ " 427 astore 108 [s108]\n" +
+ " 429 ldc <String \"\"> [15]\n" +
+ " 431 astore 109 [s109]\n" +
+ " 433 ldc <String \"\"> [15]\n" +
+ " 435 astore 110 [s110]\n" +
+ " 437 ldc <String \"\"> [15]\n" +
+ " 439 astore 111 [s111]\n" +
+ " 441 ldc <String \"\"> [15]\n" +
+ " 443 astore 112 [s112]\n" +
+ " 445 ldc <String \"\"> [15]\n" +
+ " 447 astore 113 [s113]\n" +
+ " 449 ldc <String \"\"> [15]\n" +
+ " 451 astore 114 [s114]\n" +
+ " 453 ldc <String \"\"> [15]\n" +
+ " 455 astore 115 [s115]\n" +
+ " 457 ldc <String \"\"> [15]\n" +
+ " 459 astore 116 [s116]\n" +
+ " 461 ldc <String \"\"> [15]\n" +
+ " 463 astore 117 [s117]\n" +
+ " 465 ldc <String \"\"> [15]\n" +
+ " 467 astore 118 [s118]\n" +
+ " 469 ldc <String \"\"> [15]\n" +
+ " 471 astore 119 [s119]\n" +
+ " 473 ldc <String \"\"> [15]\n" +
+ " 475 astore 120 [s120]\n" +
+ " 477 ldc <String \"\"> [15]\n" +
+ " 479 astore 121 [s121]\n" +
+ " 481 ldc <String \"\"> [15]\n" +
+ " 483 astore 122 [s122]\n" +
+ " 485 ldc <String \"\"> [15]\n" +
+ " 487 astore 123 [s123]\n" +
+ " 489 ldc <String \"\"> [15]\n" +
+ " 491 astore 124 [s124]\n" +
+ " 493 ldc <String \"\"> [15]\n" +
+ " 495 astore 125 [s125]\n" +
+ " 497 ldc <String \"\"> [15]\n" +
+ " 499 astore 126 [s126]\n" +
+ " 501 ldc <String \"\"> [15]\n" +
+ " 503 astore 127 [s127]\n" +
+ " 505 ldc <String \"\"> [15]\n" +
+ " 507 astore 128 [s128]\n" +
+ " 509 ldc <String \"\"> [15]\n" +
+ " 511 astore 129 [s129]\n" +
+ " 513 ldc <String \"\"> [15]\n" +
+ " 515 astore 130 [s130]\n" +
+ " 517 ldc <String \"\"> [15]\n" +
+ " 519 astore 131 [s131]\n" +
+ " 521 ldc <String \"\"> [15]\n" +
+ " 523 astore 132 [s132]\n" +
+ " 525 ldc <String \"\"> [15]\n" +
+ " 527 astore 133 [s133]\n" +
+ " 529 ldc <String \"\"> [15]\n" +
+ " 531 astore 134 [s134]\n" +
+ " 533 ldc <String \"\"> [15]\n" +
+ " 535 astore 135 [s135]\n" +
+ " 537 ldc <String \"\"> [15]\n" +
+ " 539 astore 136 [s136]\n" +
+ " 541 ldc <String \"\"> [15]\n" +
+ " 543 astore 137 [s137]\n" +
+ " 545 ldc <String \"\"> [15]\n" +
+ " 547 astore 138 [s138]\n" +
+ " 549 ldc <String \"\"> [15]\n" +
+ " 551 astore 139 [s139]\n" +
+ " 553 ldc <String \"\"> [15]\n" +
+ " 555 astore 140 [s140]\n" +
+ " 557 ldc <String \"\"> [15]\n" +
+ " 559 astore 141 [s141]\n" +
+ " 561 ldc <String \"\"> [15]\n" +
+ " 563 astore 142 [s142]\n" +
+ " 565 ldc <String \"\"> [15]\n" +
+ " 567 astore 143 [s143]\n" +
+ " 569 ldc <String \"\"> [15]\n" +
+ " 571 astore 144 [s144]\n" +
+ " 573 ldc <String \"\"> [15]\n" +
+ " 575 astore 145 [s145]\n" +
+ " 577 ldc <String \"\"> [15]\n" +
+ " 579 astore 146 [s146]\n" +
+ " 581 ldc <String \"\"> [15]\n" +
+ " 583 astore 147 [s147]\n" +
+ " 585 ldc <String \"\"> [15]\n" +
+ " 587 astore 148 [s148]\n" +
+ " 589 ldc <String \"\"> [15]\n" +
+ " 591 astore 149 [s149]\n" +
+ " 593 ldc <String \"\"> [15]\n" +
+ " 595 astore 150 [s150]\n" +
+ " 597 ldc <String \"\"> [15]\n" +
+ " 599 astore 151 [s151]\n" +
+ " 601 ldc <String \"\"> [15]\n" +
+ " 603 astore 152 [s152]\n" +
+ " 605 ldc <String \"\"> [15]\n" +
+ " 607 astore 153 [s153]\n" +
+ " 609 ldc <String \"\"> [15]\n" +
+ " 611 astore 154 [s154]\n" +
+ " 613 ldc <String \"\"> [15]\n" +
+ " 615 astore 155 [s155]\n" +
+ " 617 ldc <String \"\"> [15]\n" +
+ " 619 astore 156 [s156]\n" +
+ " 621 ldc <String \"\"> [15]\n" +
+ " 623 astore 157 [s157]\n" +
+ " 625 ldc <String \"\"> [15]\n" +
+ " 627 astore 158 [s158]\n" +
+ " 629 ldc <String \"\"> [15]\n" +
+ " 631 astore 159 [s159]\n" +
+ " 633 ldc <String \"\"> [15]\n" +
+ " 635 astore 160 [s160]\n" +
+ " 637 ldc <String \"\"> [15]\n" +
+ " 639 astore 161 [s161]\n" +
+ " 641 ldc <String \"\"> [15]\n" +
+ " 643 astore 162 [s162]\n" +
+ " 645 ldc <String \"\"> [15]\n" +
+ " 647 astore 163 [s163]\n" +
+ " 649 ldc <String \"\"> [15]\n" +
+ " 651 astore 164 [s164]\n" +
+ " 653 ldc <String \"\"> [15]\n" +
+ " 655 astore 165 [s165]\n" +
+ " 657 ldc <String \"\"> [15]\n" +
+ " 659 astore 166 [s166]\n" +
+ " 661 ldc <String \"\"> [15]\n" +
+ " 663 astore 167 [s167]\n" +
+ " 665 ldc <String \"\"> [15]\n" +
+ " 667 astore 168 [s168]\n" +
+ " 669 ldc <String \"\"> [15]\n" +
+ " 671 astore 169 [s169]\n" +
+ " 673 ldc <String \"\"> [15]\n" +
+ " 675 astore 170 [s170]\n" +
+ " 677 ldc <String \"\"> [15]\n" +
+ " 679 astore 171 [s171]\n" +
+ " 681 ldc <String \"\"> [15]\n" +
+ " 683 astore 172 [s172]\n" +
+ " 685 ldc <String \"\"> [15]\n" +
+ " 687 astore 173 [s173]\n" +
+ " 689 ldc <String \"\"> [15]\n" +
+ " 691 astore 174 [s174]\n" +
+ " 693 ldc <String \"\"> [15]\n" +
+ " 695 astore 175 [s175]\n" +
+ " 697 ldc <String \"\"> [15]\n" +
+ " 699 astore 176 [s176]\n" +
+ " 701 ldc <String \"\"> [15]\n" +
+ " 703 astore 177 [s177]\n" +
+ " 705 ldc <String \"\"> [15]\n" +
+ " 707 astore 178 [s178]\n" +
+ " 709 ldc <String \"\"> [15]\n" +
+ " 711 astore 179 [s179]\n" +
+ " 713 ldc <String \"\"> [15]\n" +
+ " 715 astore 180 [s180]\n" +
+ " 717 ldc <String \"\"> [15]\n" +
+ " 719 astore 181 [s181]\n" +
+ " 721 ldc <String \"\"> [15]\n" +
+ " 723 astore 182 [s182]\n" +
+ " 725 ldc <String \"\"> [15]\n" +
+ " 727 astore 183 [s183]\n" +
+ " 729 ldc <String \"\"> [15]\n" +
+ " 731 astore 184 [s184]\n" +
+ " 733 ldc <String \"\"> [15]\n" +
+ " 735 astore 185 [s185]\n" +
+ " 737 ldc <String \"\"> [15]\n" +
+ " 739 astore 186 [s186]\n" +
+ " 741 ldc <String \"\"> [15]\n" +
+ " 743 astore 187 [s187]\n" +
+ " 745 ldc <String \"\"> [15]\n" +
+ " 747 astore 188 [s188]\n" +
+ " 749 ldc <String \"\"> [15]\n" +
+ " 751 astore 189 [s189]\n" +
+ " 753 ldc <String \"\"> [15]\n" +
+ " 755 astore 190 [s190]\n" +
+ " 757 ldc <String \"\"> [15]\n" +
+ " 759 astore 191 [s191]\n" +
+ " 761 ldc <String \"\"> [15]\n" +
+ " 763 astore 192 [s192]\n" +
+ " 765 ldc <String \"\"> [15]\n" +
+ " 767 astore 193 [s193]\n" +
+ " 769 ldc <String \"\"> [15]\n" +
+ " 771 astore 194 [s194]\n" +
+ " 773 ldc <String \"\"> [15]\n" +
+ " 775 astore 195 [s195]\n" +
+ " 777 ldc <String \"\"> [15]\n" +
+ " 779 astore 196 [s196]\n" +
+ " 781 ldc <String \"\"> [15]\n" +
+ " 783 astore 197 [s197]\n" +
+ " 785 ldc <String \"\"> [15]\n" +
+ " 787 astore 198 [s198]\n" +
+ " 789 ldc <String \"\"> [15]\n" +
+ " 791 astore 199 [s199]\n" +
+ " 793 ldc <String \"\"> [15]\n" +
+ " 795 astore 200 [s200]\n" +
+ " 797 ldc <String \"\"> [15]\n" +
+ " 799 astore 201 [s201]\n" +
+ " 801 ldc <String \"\"> [15]\n" +
+ " 803 astore 202 [s202]\n" +
+ " 805 ldc <String \"\"> [15]\n" +
+ " 807 astore 203 [s203]\n" +
+ " 809 ldc <String \"\"> [15]\n" +
+ " 811 astore 204 [s204]\n" +
+ " 813 ldc <String \"\"> [15]\n" +
+ " 815 astore 205 [s205]\n" +
+ " 817 ldc <String \"\"> [15]\n" +
+ " 819 astore 206 [s206]\n" +
+ " 821 ldc <String \"\"> [15]\n" +
+ " 823 astore 207 [s207]\n" +
+ " 825 ldc <String \"\"> [15]\n" +
+ " 827 astore 208 [s208]\n" +
+ " 829 ldc <String \"\"> [15]\n" +
+ " 831 astore 209 [s209]\n" +
+ " 833 ldc <String \"\"> [15]\n" +
+ " 835 astore 210 [s210]\n" +
+ " 837 ldc <String \"\"> [15]\n" +
+ " 839 astore 211 [s211]\n" +
+ " 841 ldc <String \"\"> [15]\n" +
+ " 843 astore 212 [s212]\n" +
+ " 845 ldc <String \"\"> [15]\n" +
+ " 847 astore 213 [s213]\n" +
+ " 849 ldc <String \"\"> [15]\n" +
+ " 851 astore 214 [s214]\n" +
+ " 853 ldc <String \"\"> [15]\n" +
+ " 855 astore 215 [s215]\n" +
+ " 857 ldc <String \"\"> [15]\n" +
+ " 859 astore 216 [s216]\n" +
+ " 861 ldc <String \"\"> [15]\n" +
+ " 863 astore 217 [s217]\n" +
+ " 865 ldc <String \"\"> [15]\n" +
+ " 867 astore 218 [s218]\n" +
+ " 869 ldc <String \"\"> [15]\n" +
+ " 871 astore 219 [s219]\n" +
+ " 873 ldc <String \"\"> [15]\n" +
+ " 875 astore 220 [s220]\n" +
+ " 877 ldc <String \"\"> [15]\n" +
+ " 879 astore 221 [s221]\n" +
+ " 881 ldc <String \"\"> [15]\n" +
+ " 883 astore 222 [s222]\n" +
+ " 885 ldc <String \"\"> [15]\n" +
+ " 887 astore 223 [s223]\n" +
+ " 889 ldc <String \"\"> [15]\n" +
+ " 891 astore 224 [s224]\n" +
+ " 893 ldc <String \"\"> [15]\n" +
+ " 895 astore 225 [s225]\n" +
+ " 897 ldc <String \"\"> [15]\n" +
+ " 899 astore 226 [s226]\n" +
+ " 901 ldc <String \"\"> [15]\n" +
+ " 903 astore 227 [s227]\n" +
+ " 905 ldc <String \"\"> [15]\n" +
+ " 907 astore 228 [s228]\n" +
+ " 909 ldc <String \"\"> [15]\n" +
+ " 911 astore 229 [s229]\n" +
+ " 913 ldc <String \"\"> [15]\n" +
+ " 915 astore 230 [s230]\n" +
+ " 917 ldc <String \"\"> [15]\n" +
+ " 919 astore 231 [s231]\n" +
+ " 921 ldc <String \"\"> [15]\n" +
+ " 923 astore 232 [s232]\n" +
+ " 925 ldc <String \"\"> [15]\n" +
+ " 927 astore 233 [s233]\n" +
+ " 929 ldc <String \"\"> [15]\n" +
+ " 931 astore 234 [s234]\n" +
+ " 933 ldc <String \"\"> [15]\n" +
+ " 935 astore 235 [s235]\n" +
+ " 937 ldc <String \"\"> [15]\n" +
+ " 939 astore 236 [s236]\n" +
+ " 941 ldc <String \"\"> [15]\n" +
+ " 943 astore 237 [s237]\n" +
+ " 945 ldc <String \"\"> [15]\n" +
+ " 947 astore 238 [s238]\n" +
+ " 949 ldc <String \"\"> [15]\n" +
+ " 951 astore 239 [s239]\n" +
+ " 953 ldc <String \"\"> [15]\n" +
+ " 955 astore 240 [s240]\n" +
+ " 957 ldc <String \"\"> [15]\n" +
+ " 959 astore 241 [s241]\n" +
+ " 961 ldc <String \"\"> [15]\n" +
+ " 963 astore 242 [s242]\n" +
+ " 965 ldc <String \"\"> [15]\n" +
+ " 967 astore 243 [s243]\n" +
+ " 969 ldc <String \"\"> [15]\n" +
+ " 971 astore 244 [s244]\n" +
+ " 973 ldc <String \"\"> [15]\n" +
+ " 975 astore 245 [s245]\n" +
+ " 977 ldc <String \"\"> [15]\n" +
+ " 979 astore 246 [s246]\n" +
+ " 981 ldc <String \"\"> [15]\n" +
+ " 983 astore 247 [s247]\n" +
+ " 985 ldc <String \"\"> [15]\n" +
+ " 987 astore 248 [s248]\n" +
+ " 989 ldc <String \"\"> [15]\n" +
+ " 991 astore 249 [s249]\n" +
+ " 993 ldc <String \"\"> [15]\n" +
+ " 995 astore 250 [s250]\n" +
+ " 997 ldc <String \"\"> [15]\n" +
+ " 999 astore 251 [s251]\n" +
+ " 1001 ldc <String \"\"> [15]\n" +
+ " 1003 astore 252 [s252]\n" +
+ " 1005 iconst_1\n" +
+ " 1006 istore 253 [size1]\n" +
+ " 1008 iconst_2\n" +
+ " 1009 istore 254 [size2]\n" +
+ " 1011 iconst_3\n" +
+ " 1012 istore 255 [size3]\n" +
+ " 1014 iload 253 [size1]\n" +
+ " 1016 iload 254 [size2]\n" +
+ " 1018 iload 255 [size3]\n" +
+ " 1020 multianewarray int[][][] [17]\n" +
+ " 1024 wide\n" +
+ " 1025 astore 256 [intArray]\n" +
+ " 1028 iconst_0\n" +
+ " 1029 wide\n" +
+ " 1030 istore 257 [i]\n" +
+ " 1033 goto 1124\n" +
+ " 1036 iconst_0\n" +
+ " 1037 wide\n" +
+ " 1038 istore 258 [j]\n" +
+ " 1041 goto 1109\n" +
+ " 1044 iconst_0\n" +
+ " 1045 wide\n" +
+ " 1046 istore 259 [on]\n" +
+ " 1049 iconst_0\n" +
+ " 1050 wide\n" +
+ " 1051 istore 260 [k]\n" +
+ " 1054 goto 1094\n" +
+ " 1057 wide\n" +
+ " 1058 aload 256 [intArray]\n" +
+ " 1061 wide\n" +
+ " 1062 iload 257 [i]\n" +
+ " 1065 aaload\n" +
+ " 1066 wide\n" +
+ " 1067 iload 258 [j]\n" +
+ " 1070 aaload\n" +
+ " 1071 wide\n" +
+ " 1072 iload 260 [k]\n" +
+ " 1075 wide\n" +
+ " 1076 iload 259 [on]\n" +
+ " 1079 ifeq 1086\n" +
+ " 1082 iconst_0\n" +
+ " 1083 goto 1087\n" +
+ " 1086 iconst_1\n" +
+ " 1087 iastore\n" +
+ " 1088 wide\n" +
+ " 1089 iinc 260 1 [k]\n" +
+ " 1094 wide\n" +
+ " 1095 iload 260 [k]\n" +
+ " 1098 iload 255 [size3]\n" +
+ " 1100 if_icmplt 1057\n" +
+ " 1103 wide\n" +
+ " 1104 iinc 258 1 [j]\n" +
+ " 1109 wide\n" +
+ " 1110 iload 258 [j]\n" +
+ " 1113 iload 254 [size2]\n" +
+ " 1115 if_icmplt 1044\n" +
+ " 1118 wide\n" +
+ " 1119 iinc 257 1 [i]\n" +
+ " 1124 wide\n" +
+ " 1125 iload 257 [i]\n" +
+ " 1128 iload 253 [size1]\n" +
+ " 1130 if_icmplt 1036\n" +
+ " 1133 return\n" +
+ " Line numbers:\n" +
+ " [pc: 0, line: 4]\n" +
+ " [pc: 37, line: 5]\n" +
+ " [pc: 77, line: 6]\n" +
+ " [pc: 117, line: 7]\n" +
+ " [pc: 157, line: 8]\n" +
+ " [pc: 197, line: 9]\n" +
+ " [pc: 237, line: 10]\n" +
+ " [pc: 277, line: 11]\n" +
+ " [pc: 317, line: 12]\n" +
+ " [pc: 357, line: 13]\n" +
+ " [pc: 397, line: 14]\n" +
+ " [pc: 437, line: 15]\n" +
+ " [pc: 477, line: 16]\n" +
+ " [pc: 517, line: 17]\n" +
+ " [pc: 557, line: 18]\n" +
+ " [pc: 597, line: 19]\n" +
+ " [pc: 637, line: 20]\n" +
+ " [pc: 677, line: 21]\n" +
+ " [pc: 717, line: 22]\n" +
+ " [pc: 757, line: 23]\n" +
+ " [pc: 797, line: 24]\n" +
+ " [pc: 837, line: 25]\n" +
+ " [pc: 877, line: 26]\n" +
+ " [pc: 917, line: 27]\n" +
+ " [pc: 957, line: 28]\n" +
+ " [pc: 997, line: 29]\n" +
+ " [pc: 1005, line: 31]\n" +
+ " [pc: 1008, line: 32]\n" +
+ " [pc: 1011, line: 33]\n" +
+ " [pc: 1014, line: 35]\n" +
+ " [pc: 1028, line: 37]\n" +
+ " [pc: 1036, line: 38]\n" +
+ " [pc: 1044, line: 39]\n" +
+ " [pc: 1049, line: 40]\n" +
+ " [pc: 1057, line: 41]\n" +
+ " [pc: 1088, line: 40]\n" +
+ " [pc: 1103, line: 38]\n" +
+ " [pc: 1118, line: 37]\n" +
+ " [pc: 1133, line: 46]\n" +
+ " Local variable table:\n" +
+ " [pc: 0, pc: 1134] local: this index: 0 type: X\n" +
+ " [pc: 3, pc: 1134] local: s1 index: 1 type: java.lang.String\n" +
+ " [pc: 6, pc: 1134] local: s2 index: 2 type: java.lang.String\n" +
+ " [pc: 9, pc: 1134] local: s3 index: 3 type: java.lang.String\n" +
+ " [pc: 13, pc: 1134] local: s4 index: 4 type: java.lang.String\n" +
+ " [pc: 17, pc: 1134] local: s5 index: 5 type: java.lang.String\n" +
+ " [pc: 21, pc: 1134] local: s6 index: 6 type: java.lang.String\n" +
+ " [pc: 25, pc: 1134] local: s7 index: 7 type: java.lang.String\n" +
+ " [pc: 29, pc: 1134] local: s8 index: 8 type: java.lang.String\n" +
+ " [pc: 33, pc: 1134] local: s9 index: 9 type: java.lang.String\n" +
+ " [pc: 37, pc: 1134] local: s10 index: 10 type: java.lang.String\n" +
+ " [pc: 41, pc: 1134] local: s11 index: 11 type: java.lang.String\n" +
+ " [pc: 45, pc: 1134] local: s12 index: 12 type: java.lang.String\n" +
+ " [pc: 49, pc: 1134] local: s13 index: 13 type: java.lang.String\n" +
+ " [pc: 53, pc: 1134] local: s14 index: 14 type: java.lang.String\n" +
+ " [pc: 57, pc: 1134] local: s15 index: 15 type: java.lang.String\n" +
+ " [pc: 61, pc: 1134] local: s16 index: 16 type: java.lang.String\n" +
+ " [pc: 65, pc: 1134] local: s17 index: 17 type: java.lang.String\n" +
+ " [pc: 69, pc: 1134] local: s18 index: 18 type: java.lang.String\n" +
+ " [pc: 73, pc: 1134] local: s19 index: 19 type: java.lang.String\n" +
+ " [pc: 77, pc: 1134] local: s20 index: 20 type: java.lang.String\n" +
+ " [pc: 81, pc: 1134] local: s21 index: 21 type: java.lang.String\n" +
+ " [pc: 85, pc: 1134] local: s22 index: 22 type: java.lang.String\n" +
+ " [pc: 89, pc: 1134] local: s23 index: 23 type: java.lang.String\n" +
+ " [pc: 93, pc: 1134] local: s24 index: 24 type: java.lang.String\n" +
+ " [pc: 97, pc: 1134] local: s25 index: 25 type: java.lang.String\n" +
+ " [pc: 101, pc: 1134] local: s26 index: 26 type: java.lang.String\n" +
+ " [pc: 105, pc: 1134] local: s27 index: 27 type: java.lang.String\n" +
+ " [pc: 109, pc: 1134] local: s28 index: 28 type: java.lang.String\n" +
+ " [pc: 113, pc: 1134] local: s29 index: 29 type: java.lang.String\n" +
+ " [pc: 117, pc: 1134] local: s30 index: 30 type: java.lang.String\n" +
+ " [pc: 121, pc: 1134] local: s31 index: 31 type: java.lang.String\n" +
+ " [pc: 125, pc: 1134] local: s32 index: 32 type: java.lang.String\n" +
+ " [pc: 129, pc: 1134] local: s33 index: 33 type: java.lang.String\n" +
+ " [pc: 133, pc: 1134] local: s34 index: 34 type: java.lang.String\n" +
+ " [pc: 137, pc: 1134] local: s35 index: 35 type: java.lang.String\n" +
+ " [pc: 141, pc: 1134] local: s36 index: 36 type: java.lang.String\n" +
+ " [pc: 145, pc: 1134] local: s37 index: 37 type: java.lang.String\n" +
+ " [pc: 149, pc: 1134] local: s38 index: 38 type: java.lang.String\n" +
+ " [pc: 153, pc: 1134] local: s39 index: 39 type: java.lang.String\n" +
+ " [pc: 157, pc: 1134] local: s40 index: 40 type: java.lang.String\n" +
+ " [pc: 161, pc: 1134] local: s41 index: 41 type: java.lang.String\n" +
+ " [pc: 165, pc: 1134] local: s42 index: 42 type: java.lang.String\n" +
+ " [pc: 169, pc: 1134] local: s43 index: 43 type: java.lang.String\n" +
+ " [pc: 173, pc: 1134] local: s44 index: 44 type: java.lang.String\n" +
+ " [pc: 177, pc: 1134] local: s45 index: 45 type: java.lang.String\n" +
+ " [pc: 181, pc: 1134] local: s46 index: 46 type: java.lang.String\n" +
+ " [pc: 185, pc: 1134] local: s47 index: 47 type: java.lang.String\n" +
+ " [pc: 189, pc: 1134] local: s48 index: 48 type: java.lang.String\n" +
+ " [pc: 193, pc: 1134] local: s49 index: 49 type: java.lang.String\n" +
+ " [pc: 197, pc: 1134] local: s50 index: 50 type: java.lang.String\n" +
+ " [pc: 201, pc: 1134] local: s51 index: 51 type: java.lang.String\n" +
+ " [pc: 205, pc: 1134] local: s52 index: 52 type: java.lang.String\n" +
+ " [pc: 209, pc: 1134] local: s53 index: 53 type: java.lang.String\n" +
+ " [pc: 213, pc: 1134] local: s54 index: 54 type: java.lang.String\n" +
+ " [pc: 217, pc: 1134] local: s55 index: 55 type: java.lang.String\n" +
+ " [pc: 221, pc: 1134] local: s56 index: 56 type: java.lang.String\n" +
+ " [pc: 225, pc: 1134] local: s57 index: 57 type: java.lang.String\n" +
+ " [pc: 229, pc: 1134] local: s58 index: 58 type: java.lang.String\n" +
+ " [pc: 233, pc: 1134] local: s59 index: 59 type: java.lang.String\n" +
+ " [pc: 237, pc: 1134] local: s60 index: 60 type: java.lang.String\n" +
+ " [pc: 241, pc: 1134] local: s61 index: 61 type: java.lang.String\n" +
+ " [pc: 245, pc: 1134] local: s62 index: 62 type: java.lang.String\n" +
+ " [pc: 249, pc: 1134] local: s63 index: 63 type: java.lang.String\n" +
+ " [pc: 253, pc: 1134] local: s64 index: 64 type: java.lang.String\n" +
+ " [pc: 257, pc: 1134] local: s65 index: 65 type: java.lang.String\n" +
+ " [pc: 261, pc: 1134] local: s66 index: 66 type: java.lang.String\n" +
+ " [pc: 265, pc: 1134] local: s67 index: 67 type: java.lang.String\n" +
+ " [pc: 269, pc: 1134] local: s68 index: 68 type: java.lang.String\n" +
+ " [pc: 273, pc: 1134] local: s69 index: 69 type: java.lang.String\n" +
+ " [pc: 277, pc: 1134] local: s70 index: 70 type: java.lang.String\n" +
+ " [pc: 281, pc: 1134] local: s71 index: 71 type: java.lang.String\n" +
+ " [pc: 285, pc: 1134] local: s72 index: 72 type: java.lang.String\n" +
+ " [pc: 289, pc: 1134] local: s73 index: 73 type: java.lang.String\n" +
+ " [pc: 293, pc: 1134] local: s74 index: 74 type: java.lang.String\n" +
+ " [pc: 297, pc: 1134] local: s75 index: 75 type: java.lang.String\n" +
+ " [pc: 301, pc: 1134] local: s76 index: 76 type: java.lang.String\n" +
+ " [pc: 305, pc: 1134] local: s77 index: 77 type: java.lang.String\n" +
+ " [pc: 309, pc: 1134] local: s78 index: 78 type: java.lang.String\n" +
+ " [pc: 313, pc: 1134] local: s79 index: 79 type: java.lang.String\n" +
+ " [pc: 317, pc: 1134] local: s80 index: 80 type: java.lang.String\n" +
+ " [pc: 321, pc: 1134] local: s81 index: 81 type: java.lang.String\n" +
+ " [pc: 325, pc: 1134] local: s82 index: 82 type: java.lang.String\n" +
+ " [pc: 329, pc: 1134] local: s83 index: 83 type: java.lang.String\n" +
+ " [pc: 333, pc: 1134] local: s84 index: 84 type: java.lang.String\n" +
+ " [pc: 337, pc: 1134] local: s85 index: 85 type: java.lang.String\n" +
+ " [pc: 341, pc: 1134] local: s86 index: 86 type: java.lang.String\n" +
+ " [pc: 345, pc: 1134] local: s87 index: 87 type: java.lang.String\n" +
+ " [pc: 349, pc: 1134] local: s88 index: 88 type: java.lang.String\n" +
+ " [pc: 353, pc: 1134] local: s89 index: 89 type: java.lang.String\n" +
+ " [pc: 357, pc: 1134] local: s90 index: 90 type: java.lang.String\n" +
+ " [pc: 361, pc: 1134] local: s91 index: 91 type: java.lang.String\n" +
+ " [pc: 365, pc: 1134] local: s92 index: 92 type: java.lang.String\n" +
+ " [pc: 369, pc: 1134] local: s93 index: 93 type: java.lang.String\n" +
+ " [pc: 373, pc: 1134] local: s94 index: 94 type: java.lang.String\n" +
+ " [pc: 377, pc: 1134] local: s95 index: 95 type: java.lang.String\n" +
+ " [pc: 381, pc: 1134] local: s96 index: 96 type: java.lang.String\n" +
+ " [pc: 385, pc: 1134] local: s97 index: 97 type: java.lang.String\n" +
+ " [pc: 389, pc: 1134] local: s98 index: 98 type: java.lang.String\n" +
+ " [pc: 393, pc: 1134] local: s99 index: 99 type: java.lang.String\n" +
+ " [pc: 397, pc: 1134] local: s100 index: 100 type: java.lang.String\n" +
+ " [pc: 401, pc: 1134] local: s101 index: 101 type: java.lang.String\n" +
+ " [pc: 405, pc: 1134] local: s102 index: 102 type: java.lang.String\n" +
+ " [pc: 409, pc: 1134] local: s103 index: 103 type: java.lang.String\n" +
+ " [pc: 413, pc: 1134] local: s104 index: 104 type: java.lang.String\n" +
+ " [pc: 417, pc: 1134] local: s105 index: 105 type: java.lang.String\n" +
+ " [pc: 421, pc: 1134] local: s106 index: 106 type: java.lang.String\n" +
+ " [pc: 425, pc: 1134] local: s107 index: 107 type: java.lang.String\n" +
+ " [pc: 429, pc: 1134] local: s108 index: 108 type: java.lang.String\n" +
+ " [pc: 433, pc: 1134] local: s109 index: 109 type: java.lang.String\n" +
+ " [pc: 437, pc: 1134] local: s110 index: 110 type: java.lang.String\n" +
+ " [pc: 441, pc: 1134] local: s111 index: 111 type: java.lang.String\n" +
+ " [pc: 445, pc: 1134] local: s112 index: 112 type: java.lang.String\n" +
+ " [pc: 449, pc: 1134] local: s113 index: 113 type: java.lang.String\n" +
+ " [pc: 453, pc: 1134] local: s114 index: 114 type: java.lang.String\n" +
+ " [pc: 457, pc: 1134] local: s115 index: 115 type: java.lang.String\n" +
+ " [pc: 461, pc: 1134] local: s116 index: 116 type: java.lang.String\n" +
+ " [pc: 465, pc: 1134] local: s117 index: 117 type: java.lang.String\n" +
+ " [pc: 469, pc: 1134] local: s118 index: 118 type: java.lang.String\n" +
+ " [pc: 473, pc: 1134] local: s119 index: 119 type: java.lang.String\n" +
+ " [pc: 477, pc: 1134] local: s120 index: 120 type: java.lang.String\n" +
+ " [pc: 481, pc: 1134] local: s121 index: 121 type: java.lang.String\n" +
+ " [pc: 485, pc: 1134] local: s122 index: 122 type: java.lang.String\n" +
+ " [pc: 489, pc: 1134] local: s123 index: 123 type: java.lang.String\n" +
+ " [pc: 493, pc: 1134] local: s124 index: 124 type: java.lang.String\n" +
+ " [pc: 497, pc: 1134] local: s125 index: 125 type: java.lang.String\n" +
+ " [pc: 501, pc: 1134] local: s126 index: 126 type: java.lang.String\n" +
+ " [pc: 505, pc: 1134] local: s127 index: 127 type: java.lang.String\n" +
+ " [pc: 509, pc: 1134] local: s128 index: 128 type: java.lang.String\n" +
+ " [pc: 513, pc: 1134] local: s129 index: 129 type: java.lang.String\n" +
+ " [pc: 517, pc: 1134] local: s130 index: 130 type: java.lang.String\n" +
+ " [pc: 521, pc: 1134] local: s131 index: 131 type: java.lang.String\n" +
+ " [pc: 525, pc: 1134] local: s132 index: 132 type: java.lang.String\n" +
+ " [pc: 529, pc: 1134] local: s133 index: 133 type: java.lang.String\n" +
+ " [pc: 533, pc: 1134] local: s134 index: 134 type: java.lang.String\n" +
+ " [pc: 537, pc: 1134] local: s135 index: 135 type: java.lang.String\n" +
+ " [pc: 541, pc: 1134] local: s136 index: 136 type: java.lang.String\n" +
+ " [pc: 545, pc: 1134] local: s137 index: 137 type: java.lang.String\n" +
+ " [pc: 549, pc: 1134] local: s138 index: 138 type: java.lang.String\n" +
+ " [pc: 553, pc: 1134] local: s139 index: 139 type: java.lang.String\n" +
+ " [pc: 557, pc: 1134] local: s140 index: 140 type: java.lang.String\n" +
+ " [pc: 561, pc: 1134] local: s141 index: 141 type: java.lang.String\n" +
+ " [pc: 565, pc: 1134] local: s142 index: 142 type: java.lang.String\n" +
+ " [pc: 569, pc: 1134] local: s143 index: 143 type: java.lang.String\n" +
+ " [pc: 573, pc: 1134] local: s144 index: 144 type: java.lang.String\n" +
+ " [pc: 577, pc: 1134] local: s145 index: 145 type: java.lang.String\n" +
+ " [pc: 581, pc: 1134] local: s146 index: 146 type: java.lang.String\n" +
+ " [pc: 585, pc: 1134] local: s147 index: 147 type: java.lang.String\n" +
+ " [pc: 589, pc: 1134] local: s148 index: 148 type: java.lang.String\n" +
+ " [pc: 593, pc: 1134] local: s149 index: 149 type: java.lang.String\n" +
+ " [pc: 597, pc: 1134] local: s150 index: 150 type: java.lang.String\n" +
+ " [pc: 601, pc: 1134] local: s151 index: 151 type: java.lang.String\n" +
+ " [pc: 605, pc: 1134] local: s152 index: 152 type: java.lang.String\n" +
+ " [pc: 609, pc: 1134] local: s153 index: 153 type: java.lang.String\n" +
+ " [pc: 613, pc: 1134] local: s154 index: 154 type: java.lang.String\n" +
+ " [pc: 617, pc: 1134] local: s155 index: 155 type: java.lang.String\n" +
+ " [pc: 621, pc: 1134] local: s156 index: 156 type: java.lang.String\n" +
+ " [pc: 625, pc: 1134] local: s157 index: 157 type: java.lang.String\n" +
+ " [pc: 629, pc: 1134] local: s158 index: 158 type: java.lang.String\n" +
+ " [pc: 633, pc: 1134] local: s159 index: 159 type: java.lang.String\n" +
+ " [pc: 637, pc: 1134] local: s160 index: 160 type: java.lang.String\n" +
+ " [pc: 641, pc: 1134] local: s161 index: 161 type: java.lang.String\n" +
+ " [pc: 645, pc: 1134] local: s162 index: 162 type: java.lang.String\n" +
+ " [pc: 649, pc: 1134] local: s163 index: 163 type: java.lang.String\n" +
+ " [pc: 653, pc: 1134] local: s164 index: 164 type: java.lang.String\n" +
+ " [pc: 657, pc: 1134] local: s165 index: 165 type: java.lang.String\n" +
+ " [pc: 661, pc: 1134] local: s166 index: 166 type: java.lang.String\n" +
+ " [pc: 665, pc: 1134] local: s167 index: 167 type: java.lang.String\n" +
+ " [pc: 669, pc: 1134] local: s168 index: 168 type: java.lang.String\n" +
+ " [pc: 673, pc: 1134] local: s169 index: 169 type: java.lang.String\n" +
+ " [pc: 677, pc: 1134] local: s170 index: 170 type: java.lang.String\n" +
+ " [pc: 681, pc: 1134] local: s171 index: 171 type: java.lang.String\n" +
+ " [pc: 685, pc: 1134] local: s172 index: 172 type: java.lang.String\n" +
+ " [pc: 689, pc: 1134] local: s173 index: 173 type: java.lang.String\n" +
+ " [pc: 693, pc: 1134] local: s174 index: 174 type: java.lang.String\n" +
+ " [pc: 697, pc: 1134] local: s175 index: 175 type: java.lang.String\n" +
+ " [pc: 701, pc: 1134] local: s176 index: 176 type: java.lang.String\n" +
+ " [pc: 705, pc: 1134] local: s177 index: 177 type: java.lang.String\n" +
+ " [pc: 709, pc: 1134] local: s178 index: 178 type: java.lang.String\n" +
+ " [pc: 713, pc: 1134] local: s179 index: 179 type: java.lang.String\n" +
+ " [pc: 717, pc: 1134] local: s180 index: 180 type: java.lang.String\n" +
+ " [pc: 721, pc: 1134] local: s181 index: 181 type: java.lang.String\n" +
+ " [pc: 725, pc: 1134] local: s182 index: 182 type: java.lang.String\n" +
+ " [pc: 729, pc: 1134] local: s183 index: 183 type: java.lang.String\n" +
+ " [pc: 733, pc: 1134] local: s184 index: 184 type: java.lang.String\n" +
+ " [pc: 737, pc: 1134] local: s185 index: 185 type: java.lang.String\n" +
+ " [pc: 741, pc: 1134] local: s186 index: 186 type: java.lang.String\n" +
+ " [pc: 745, pc: 1134] local: s187 index: 187 type: java.lang.String\n" +
+ " [pc: 749, pc: 1134] local: s188 index: 188 type: java.lang.String\n" +
+ " [pc: 753, pc: 1134] local: s189 index: 189 type: java.lang.String\n" +
+ " [pc: 757, pc: 1134] local: s190 index: 190 type: java.lang.String\n" +
+ " [pc: 761, pc: 1134] local: s191 index: 191 type: java.lang.String\n" +
+ " [pc: 765, pc: 1134] local: s192 index: 192 type: java.lang.String\n" +
+ " [pc: 769, pc: 1134] local: s193 index: 193 type: java.lang.String\n" +
+ " [pc: 773, pc: 1134] local: s194 index: 194 type: java.lang.String\n" +
+ " [pc: 777, pc: 1134] local: s195 index: 195 type: java.lang.String\n" +
+ " [pc: 781, pc: 1134] local: s196 index: 196 type: java.lang.String\n" +
+ " [pc: 785, pc: 1134] local: s197 index: 197 type: java.lang.String\n" +
+ " [pc: 789, pc: 1134] local: s198 index: 198 type: java.lang.String\n" +
+ " [pc: 793, pc: 1134] local: s199 index: 199 type: java.lang.String\n" +
+ " [pc: 797, pc: 1134] local: s200 index: 200 type: java.lang.String\n" +
+ " [pc: 801, pc: 1134] local: s201 index: 201 type: java.lang.String\n" +
+ " [pc: 805, pc: 1134] local: s202 index: 202 type: java.lang.String\n" +
+ " [pc: 809, pc: 1134] local: s203 index: 203 type: java.lang.String\n" +
+ " [pc: 813, pc: 1134] local: s204 index: 204 type: java.lang.String\n" +
+ " [pc: 817, pc: 1134] local: s205 index: 205 type: java.lang.String\n" +
+ " [pc: 821, pc: 1134] local: s206 index: 206 type: java.lang.String\n" +
+ " [pc: 825, pc: 1134] local: s207 index: 207 type: java.lang.String\n" +
+ " [pc: 829, pc: 1134] local: s208 index: 208 type: java.lang.String\n" +
+ " [pc: 833, pc: 1134] local: s209 index: 209 type: java.lang.String\n" +
+ " [pc: 837, pc: 1134] local: s210 index: 210 type: java.lang.String\n" +
+ " [pc: 841, pc: 1134] local: s211 index: 211 type: java.lang.String\n" +
+ " [pc: 845, pc: 1134] local: s212 index: 212 type: java.lang.String\n" +
+ " [pc: 849, pc: 1134] local: s213 index: 213 type: java.lang.String\n" +
+ " [pc: 853, pc: 1134] local: s214 index: 214 type: java.lang.String\n" +
+ " [pc: 857, pc: 1134] local: s215 index: 215 type: java.lang.String\n" +
+ " [pc: 861, pc: 1134] local: s216 index: 216 type: java.lang.String\n" +
+ " [pc: 865, pc: 1134] local: s217 index: 217 type: java.lang.String\n" +
+ " [pc: 869, pc: 1134] local: s218 index: 218 type: java.lang.String\n" +
+ " [pc: 873, pc: 1134] local: s219 index: 219 type: java.lang.String\n" +
+ " [pc: 877, pc: 1134] local: s220 index: 220 type: java.lang.String\n" +
+ " [pc: 881, pc: 1134] local: s221 index: 221 type: java.lang.String\n" +
+ " [pc: 885, pc: 1134] local: s222 index: 222 type: java.lang.String\n" +
+ " [pc: 889, pc: 1134] local: s223 index: 223 type: java.lang.String\n" +
+ " [pc: 893, pc: 1134] local: s224 index: 224 type: java.lang.String\n" +
+ " [pc: 897, pc: 1134] local: s225 index: 225 type: java.lang.String\n" +
+ " [pc: 901, pc: 1134] local: s226 index: 226 type: java.lang.String\n" +
+ " [pc: 905, pc: 1134] local: s227 index: 227 type: java.lang.String\n" +
+ " [pc: 909, pc: 1134] local: s228 index: 228 type: java.lang.String\n" +
+ " [pc: 913, pc: 1134] local: s229 index: 229 type: java.lang.String\n" +
+ " [pc: 917, pc: 1134] local: s230 index: 230 type: java.lang.String\n" +
+ " [pc: 921, pc: 1134] local: s231 index: 231 type: java.lang.String\n" +
+ " [pc: 925, pc: 1134] local: s232 index: 232 type: java.lang.String\n" +
+ " [pc: 929, pc: 1134] local: s233 index: 233 type: java.lang.String\n" +
+ " [pc: 933, pc: 1134] local: s234 index: 234 type: java.lang.String\n" +
+ " [pc: 937, pc: 1134] local: s235 index: 235 type: java.lang.String\n" +
+ " [pc: 941, pc: 1134] local: s236 index: 236 type: java.lang.String\n" +
+ " [pc: 945, pc: 1134] local: s237 index: 237 type: java.lang.String\n" +
+ " [pc: 949, pc: 1134] local: s238 index: 238 type: java.lang.String\n" +
+ " [pc: 953, pc: 1134] local: s239 index: 239 type: java.lang.String\n" +
+ " [pc: 957, pc: 1134] local: s240 index: 240 type: java.lang.String\n" +
+ " [pc: 961, pc: 1134] local: s241 index: 241 type: java.lang.String\n" +
+ " [pc: 965, pc: 1134] local: s242 index: 242 type: java.lang.String\n" +
+ " [pc: 969, pc: 1134] local: s243 index: 243 type: java.lang.String\n" +
+ " [pc: 973, pc: 1134] local: s244 index: 244 type: java.lang.String\n" +
+ " [pc: 977, pc: 1134] local: s245 index: 245 type: java.lang.String\n" +
+ " [pc: 981, pc: 1134] local: s246 index: 246 type: java.lang.String\n" +
+ " [pc: 985, pc: 1134] local: s247 index: 247 type: java.lang.String\n" +
+ " [pc: 989, pc: 1134] local: s248 index: 248 type: java.lang.String\n" +
+ " [pc: 993, pc: 1134] local: s249 index: 249 type: java.lang.String\n" +
+ " [pc: 997, pc: 1134] local: s250 index: 250 type: java.lang.String\n" +
+ " [pc: 1001, pc: 1134] local: s251 index: 251 type: java.lang.String\n" +
+ " [pc: 1005, pc: 1134] local: s252 index: 252 type: java.lang.String\n" +
+ " [pc: 1008, pc: 1134] local: size1 index: 253 type: int\n" +
+ " [pc: 1011, pc: 1134] local: size2 index: 254 type: int\n" +
+ " [pc: 1014, pc: 1134] local: size3 index: 255 type: int\n" +
+ " [pc: 1028, pc: 1134] local: intArray index: 256 type: int[][][]\n" +
+ " [pc: 1033, pc: 1133] local: i index: 257 type: int\n" +
+ " [pc: 1041, pc: 1118] local: j index: 258 type: int\n" +
+ " [pc: 1049, pc: 1103] local: on index: 259 type: boolean\n" +
+ " [pc: 1054, pc: 1103] local: k index: 260 type: int\n";
+
+ File f = new File(OUTPUT_DIR + File.separator + "X.class");
+ byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f);
+ ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+ String result = disassembler.disassemble(classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED);
+ int index = result.indexOf(expectedOutput);
+ if (index == -1 || expectedOutput.length() == 0) {
+ System.out.println(Util.displayString(result, 3));
+ }
+ if (index == -1) {
+ assertEquals("Wrong contents", expectedOutput, result);
+ }
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test007() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " int[][][] intArray = new int[size1][size2][];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " intArray[i][j] = new int[size3];\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " intArray[i][j][k] = on ? 0 : 1;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test008() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " String[][][] array = new String[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? \"true\" : \"false\";\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test009() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " boolean[][][] array = new boolean[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? true : false;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test010() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " long[][][] array = new long[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? 234L : 12345L;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test011() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " double[][][] array = new double[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? 2.0 : 3.0;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test012() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " float[][][] array = new float[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? 2.0f : 3.0f;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test013() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " char[][][] array = new char[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? 'c' : 'd';\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test014() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " byte[][][] array = new byte[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? (byte) 1 : (byte) 0;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=457426
+public void test015() throws Exception {
+ Map settings = getCompilerOptions();
+ settings.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "public final class X {\n" +
+ "\n" +
+ " public void show() {\n" +
+ " String s1 = \"\"; String s2 = \"\"; String s3 = \"\"; String s4 = \"\"; String s5 = \"\"; String s6 = \"\"; String s7 = \"\"; String s8 = \"\"; String s9 = \"\"; String s10 = \"\";\n" +
+ " String s11 = \"\"; String s12 = \"\"; String s13 = \"\"; String s14 = \"\"; String s15 = \"\"; String s16 = \"\"; String s17 = \"\"; String s18 = \"\"; String s19 = \"\"; String s20 = \"\";\n" +
+ " String s21 = \"\"; String s22 = \"\"; String s23 = \"\"; String s24 = \"\"; String s25 = \"\"; String s26 = \"\"; String s27 = \"\"; String s28 = \"\"; String s29 = \"\"; String s30 = \"\";\n" +
+ " String s31 = \"\"; String s32 = \"\"; String s33 = \"\"; String s34 = \"\"; String s35 = \"\"; String s36 = \"\"; String s37 = \"\"; String s38 = \"\"; String s39 = \"\"; String s40 = \"\";\n" +
+ " String s41 = \"\"; String s42 = \"\"; String s43 = \"\"; String s44 = \"\"; String s45 = \"\"; String s46 = \"\"; String s47 = \"\"; String s48 = \"\"; String s49 = \"\"; String s50 = \"\";\n" +
+ " String s51 = \"\"; String s52 = \"\"; String s53 = \"\"; String s54 = \"\"; String s55 = \"\"; String s56 = \"\"; String s57 = \"\"; String s58 = \"\"; String s59 = \"\"; String s60 = \"\";\n" +
+ " String s61 = \"\"; String s62 = \"\"; String s63 = \"\"; String s64 = \"\"; String s65 = \"\"; String s66 = \"\"; String s67 = \"\"; String s68 = \"\"; String s69 = \"\"; String s70 = \"\";\n" +
+ " String s71 = \"\"; String s72 = \"\"; String s73 = \"\"; String s74 = \"\"; String s75 = \"\"; String s76 = \"\"; String s77 = \"\"; String s78 = \"\"; String s79 = \"\"; String s80 = \"\";\n" +
+ " String s81 = \"\"; String s82 = \"\"; String s83 = \"\"; String s84 = \"\"; String s85 = \"\"; String s86 = \"\"; String s87 = \"\"; String s88 = \"\"; String s89 = \"\"; String s90 = \"\";\n" +
+ " String s91 = \"\"; String s92 = \"\"; String s93 = \"\"; String s94 = \"\"; String s95 = \"\"; String s96 = \"\"; String s97 = \"\"; String s98 = \"\"; String s99 = \"\"; String s100 = \"\";\n" +
+ " String s101 = \"\"; String s102 = \"\"; String s103 = \"\"; String s104 = \"\"; String s105 = \"\"; String s106 = \"\"; String s107 = \"\"; String s108 = \"\"; String s109 = \"\"; String s110 = \"\";\n" +
+ " String s111 = \"\"; String s112 = \"\"; String s113 = \"\"; String s114 = \"\"; String s115 = \"\"; String s116 = \"\"; String s117 = \"\"; String s118 = \"\"; String s119 = \"\"; String s120 = \"\";\n" +
+ " String s121 = \"\"; String s122 = \"\"; String s123 = \"\"; String s124 = \"\"; String s125 = \"\"; String s126 = \"\"; String s127 = \"\"; String s128 = \"\"; String s129 = \"\"; String s130 = \"\";\n" +
+ " String s131 = \"\"; String s132 = \"\"; String s133 = \"\"; String s134 = \"\"; String s135 = \"\"; String s136 = \"\"; String s137 = \"\"; String s138 = \"\"; String s139 = \"\"; String s140 = \"\";\n" +
+ " String s141 = \"\"; String s142 = \"\"; String s143 = \"\"; String s144 = \"\"; String s145 = \"\"; String s146 = \"\"; String s147 = \"\"; String s148 = \"\"; String s149 = \"\"; String s150 = \"\";\n" +
+ " String s151 = \"\"; String s152 = \"\"; String s153 = \"\"; String s154 = \"\"; String s155 = \"\"; String s156 = \"\"; String s157 = \"\"; String s158 = \"\"; String s159 = \"\"; String s160 = \"\";\n" +
+ " String s161 = \"\"; String s162 = \"\"; String s163 = \"\"; String s164 = \"\"; String s165 = \"\"; String s166 = \"\"; String s167 = \"\"; String s168 = \"\"; String s169 = \"\"; String s170 = \"\";\n" +
+ " String s171 = \"\"; String s172 = \"\"; String s173 = \"\"; String s174 = \"\"; String s175 = \"\"; String s176 = \"\"; String s177 = \"\"; String s178 = \"\"; String s179 = \"\"; String s180 = \"\";\n" +
+ " String s181 = \"\"; String s182 = \"\"; String s183 = \"\"; String s184 = \"\"; String s185 = \"\"; String s186 = \"\"; String s187 = \"\"; String s188 = \"\"; String s189 = \"\"; String s190 = \"\";\n" +
+ " String s191 = \"\"; String s192 = \"\"; String s193 = \"\"; String s194 = \"\"; String s195 = \"\"; String s196 = \"\"; String s197 = \"\"; String s198 = \"\"; String s199 = \"\"; String s200 = \"\";\n" +
+ " String s201 = \"\"; String s202 = \"\"; String s203 = \"\"; String s204 = \"\"; String s205 = \"\"; String s206 = \"\"; String s207 = \"\"; String s208 = \"\"; String s209 = \"\"; String s210 = \"\";\n" +
+ " String s211 = \"\"; String s212 = \"\"; String s213 = \"\"; String s214 = \"\"; String s215 = \"\"; String s216 = \"\"; String s217 = \"\"; String s218 = \"\"; String s219 = \"\"; String s220 = \"\";\n" +
+ " String s221 = \"\"; String s222 = \"\"; String s223 = \"\"; String s224 = \"\"; String s225 = \"\"; String s226 = \"\"; String s227 = \"\"; String s228 = \"\"; String s229 = \"\"; String s230 = \"\";\n" +
+ " String s231 = \"\"; String s232 = \"\"; String s233 = \"\"; String s234 = \"\"; String s235 = \"\"; String s236 = \"\"; String s237 = \"\"; String s238 = \"\"; String s239 = \"\"; String s240 = \"\";\n" +
+ " String s241 = \"\"; String s242 = \"\"; String s243 = \"\"; String s244 = \"\"; String s245 = \"\"; String s246 = \"\"; String s247 = \"\"; String s248 = \"\"; String s249 = \"\"; String s250 = \"\";\n" +
+ " String s251 = \"\"; String s252 = \"\";\n" +
+ "\n" +
+ " int size1 = 1;\n" +
+ " int size2 = 2;\n" +
+ " int size3 = 3;\n" +
+ "\n" +
+ " short[][][] array = new short[size1][size2][size3];\n" +
+ " \n" +
+ " for (int i = 0; i < size1; i++) {\n" +
+ " for (int j = 0; j < size2; j++) {\n" +
+ " boolean on = false;\n" +
+ " for (int k = 0; k < size3; k++) {\n" +
+ " array[i][j][k] = on ? (short) 1 : (short) 0;\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " new X().show();\n" +
+ " }\n" +
+ "}",
+ },
+ "",
+ settings);
+}
public static Class testClass() {
return ForStatementTest.class;
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java
index 0400ac5..2f76894 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java
@@ -25,6 +25,7 @@
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ForeachStatementTest extends AbstractComparableTest {
public ForeachStatementTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeSignatureTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeSignatureTest.java
index 8675954..bc82e03 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeSignatureTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeSignatureTest.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
@@ -36,6 +36,7 @@
import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "rawtypes" })
public class GenericTypeSignatureTest extends AbstractRegressionTest {
class Logger extends Thread {
StringBuffer buffer;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
index fad775e..795d25a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
@@ -36,6 +36,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class GenericTypeTest extends AbstractComparableTest {
public GenericTypeTest(String name) {
@@ -35565,7 +35566,6 @@
"");
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=159214 - variation
-// FIXME javac8 rejects
public void test1045() {
this.runConformTest(
new String[] {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java
index 94c0c6f..c2e237c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -30,6 +30,8 @@
* Bug 434793 - [1.8][null][compiler] AIOOBE in ParameterizedGenericMethodBinding.substitute when inlining a method
* Bug 438337 - StackOverflow after update from Kepler to Luna
* Bug 452194 - Code no longer compiles in 4.4.1, but with confusing error
+ * Bug 456459 - Discrepancy between Eclipse compiler and javac - Enums, interfaces, and generics
+ * Bug 456924 - StackOverflowError during compilation
*******************************************************************************/
package org.eclipse.jdt.core.tests.compiler.regression;
@@ -42,6 +44,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class GenericsRegressionTest extends AbstractComparableTest {
public GenericsRegressionTest(String name) {
@@ -51,7 +54,7 @@
// Static initializer to specify tests subset using TESTS_* static variables
// All specified tests which does not belong to the class are skipped...
static {
-// TESTS_NAMES = new String[] { "testBug435643" };
+// TESTS_NAMES = new String[] { "testBug456459" };
// TESTS_NUMBERS = new int[] { 1465 };
// TESTS_RANGE = new int[] { 1097, -1 };
}
@@ -5450,5 +5453,289 @@
"The method addUnique(Map.Entry) in the type EcoreEMap is not applicable for the arguments (Object)\n" +
"----------\n");
}
+public void testBug453253() {
+ runNegativeTest(
+ new String[] {
+ "example/CollectionFactory.java",
+ "/*\n" +
+ " * Copyright 2002-2014 the original author or authors.\n" +
+ " *\n" +
+ " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" +
+ " * you may not use this file except in compliance with the License.\n" +
+ " * You may obtain a copy of the License at\n" +
+ " *\n" +
+ " * http://www.apache.org/licenses/LICENSE-2.0\n" +
+ " *\n" +
+ " * Unless required by applicable law or agreed to in writing, software\n" +
+ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
+ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
+ " * See the License for the specific language governing permissions and\n" +
+ " * limitations under the License.\n" +
+ " */\n" +
+ "\n" +
+ "package example;\n" +
+ "\n" +
+ "import java.util.ArrayList;\n" +
+ "import java.util.Collection;\n" +
+ "import java.util.EnumSet;\n" +
+ "import java.util.LinkedHashSet;\n" +
+ "import java.util.LinkedList;\n" +
+ "import java.util.List;\n" +
+ "import java.util.NavigableSet;\n" +
+ "import java.util.Set;\n" +
+ "import java.util.SortedSet;\n" +
+ "import java.util.TreeSet;\n" +
+ "\n" +
+ "/**\n" +
+ " * The code in this class is taken directly from the Spring Framework for the purpose\n" +
+ " * of reproducing a bug.\n" +
+ " * <p>\n" +
+ " * Specifically, the code comes from {@code org.springframework.core.CollectionFactory}.\n" +
+ " *\n" +
+ " * @author Juergen Hoeller\n" +
+ " * @author Arjen Poutsma\n" +
+ " * @author Sam Brannen\n" +
+ " */\n" +
+ "public abstract class CollectionFactory {\n" +
+ "\n" +
+ " @SuppressWarnings({ \"unchecked\", \"cast\" })\n" +
+ " public static <E> Collection<E> createApproximateCollection(Object collection, int capacity) {\n" +
+ " if (collection instanceof LinkedList) {\n" +
+ " return new LinkedList<E>();\n" +
+ " }\n" +
+ " else if (collection instanceof List) {\n" +
+ " return new ArrayList<E>(capacity);\n" +
+ " }\n" +
+ " else if (collection instanceof EnumSet) {\n" +
+ " // superfluous cast necessary for bug in Eclipse 4.4.1.\n" +
+ " // return (Collection<E>) EnumSet.copyOf((EnumSet) collection);\n" +
+ "\n" +
+ " // Original code which compiles using OpenJDK 1.8.0_40-ea-b11 and IntelliJ IDEA\n" +
+ " return EnumSet.copyOf((EnumSet) collection);\n" +
+ " }\n" +
+ " else if (collection instanceof SortedSet) {\n" +
+ " return new TreeSet<E>(((SortedSet<E>) collection).comparator());\n" +
+ " }\n" +
+ " else {\n" +
+ " return new LinkedHashSet<E>(capacity);\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " public static <E> Collection<E> createCollection(Class<?> collectionClass, Class<?> elementType, int capacity) {\n" +
+ " if (collectionClass.isInterface()) {\n" +
+ " if (Set.class.equals(collectionClass) || Collection.class.equals(collectionClass)) {\n" +
+ " return new LinkedHashSet<E>(capacity);\n" +
+ " }\n" +
+ " else if (List.class.equals(collectionClass)) {\n" +
+ " return new ArrayList<E>(capacity);\n" +
+ " }\n" +
+ " else if (SortedSet.class.equals(collectionClass) || NavigableSet.class.equals(collectionClass)) {\n" +
+ " return new TreeSet<E>();\n" +
+ " }\n" +
+ " else {\n" +
+ " throw new IllegalArgumentException(\"Unsupported Collection interface: \" + collectionClass.getName());\n" +
+ " }\n" +
+ " }\n" +
+ " else if (EnumSet.class.equals(collectionClass)) {\n" +
+ " // Assert.notNull(elementType, \"Cannot create EnumSet for unknown element type\");\n" +
+ "\n" +
+ " // superfluous cast necessary for bug in Eclipse 4.4.1.\n" +
+ " // return (Collection<E>) EnumSet.noneOf((Class) elementType);\n" +
+ "\n" +
+ " // Original code which compiles using OpenJDK 1.8.0_40-ea-b11 and IntelliJ IDEA\n" +
+ " return EnumSet.noneOf((Class) elementType);\n" +
+ " }\n" +
+ " else {\n" +
+ " if (!Collection.class.isAssignableFrom(collectionClass)) {\n" +
+ " throw new IllegalArgumentException(\"Unsupported Collection type: \" + collectionClass.getName());\n" +
+ " }\n" +
+ " try {\n" +
+ " return (Collection<E>) collectionClass.newInstance();\n" +
+ " }\n" +
+ " catch (Exception ex) {\n" +
+ " throw new IllegalArgumentException(\n" +
+ " \"Could not instantiate Collection type: \" + collectionClass.getName(), ex);\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ "}\n"
+ },
+ (this.complianceLevel < ClassFileConstants.JDK1_8 ?
+ "----------\n" +
+ "1. WARNING in example\\CollectionFactory.java (at line 42)\n" +
+ " @SuppressWarnings({ \"unchecked\", \"cast\" })\n" +
+ " ^^^^^^\n" +
+ "Unnecessary @SuppressWarnings(\"cast\")\n" +
+ "----------\n" +
+ "2. WARNING in example\\CollectionFactory.java (at line 55)\n" +
+ " return EnumSet.copyOf((EnumSet) collection);\n" +
+ " ^^^^^^^\n" +
+ "EnumSet is a raw type. References to generic type EnumSet<E> should be parameterized\n" +
+ "----------\n" +
+ "3. WARNING in example\\CollectionFactory.java (at line 87)\n" +
+ " return EnumSet.noneOf((Class) elementType);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: Unchecked invocation noneOf(Class) of the generic method noneOf(Class<E>) of type EnumSet\n" +
+ "----------\n" +
+ "4. WARNING in example\\CollectionFactory.java (at line 87)\n" +
+ " return EnumSet.noneOf((Class) elementType);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: The expression of type EnumSet needs unchecked conversion to conform to Collection<E>\n" +
+ "----------\n" +
+ "5. WARNING in example\\CollectionFactory.java (at line 87)\n" +
+ " return EnumSet.noneOf((Class) elementType);\n" +
+ " ^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: The expression of type Class needs unchecked conversion to conform to Class<E>\n" +
+ "----------\n" +
+ "6. WARNING in example\\CollectionFactory.java (at line 87)\n" +
+ " return EnumSet.noneOf((Class) elementType);\n" +
+ " ^^^^^\n" +
+ "Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+ "----------\n" +
+ "7. WARNING in example\\CollectionFactory.java (at line 94)\n" +
+ " return (Collection<E>) collectionClass.newInstance();\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: Unchecked cast from capture#13-of ? to Collection<E>\n" +
+ "----------\n"
+ :
+ "----------\n" +
+ "1. ERROR in example\\CollectionFactory.java (at line 55)\n" +
+ " return EnumSet.copyOf((EnumSet) collection);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type mismatch: cannot convert from EnumSet<Enum<Enum<E>>> to Collection<E>\n" +
+ "----------\n" +
+ "2. WARNING in example\\CollectionFactory.java (at line 55)\n" +
+ " return EnumSet.copyOf((EnumSet) collection);\n" +
+ " ^^^^^^^\n" +
+ "EnumSet is a raw type. References to generic type EnumSet<E> should be parameterized\n" +
+ "----------\n" +
+ "3. ERROR in example\\CollectionFactory.java (at line 87)\n" +
+ " return EnumSet.noneOf((Class) elementType);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type mismatch: cannot convert from EnumSet<Enum<Enum<E>>> to Collection<E>\n" +
+ "----------\n" +
+ "4. WARNING in example\\CollectionFactory.java (at line 87)\n" +
+ " return EnumSet.noneOf((Class) elementType);\n" +
+ " ^^^^^\n" +
+ "Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+ "----------\n" +
+ "5. WARNING in example\\CollectionFactory.java (at line 94)\n" +
+ " return (Collection<E>) collectionClass.newInstance();\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: Unchecked cast from capture#13-of ? to Collection<E>\n" +
+ "----------\n"
+ ));
+}
+// original test case, documenting existing compiler behavior
+public void testBug456459a() {
+ runNegativeTest(
+ new String[] {
+ "EnumTest.java",
+ "import java.util.EnumSet;\n" +
+ "public class EnumTest {\n" +
+ " \n" +
+ " static enum Cloneables implements Cloneable {\n" +
+ " One, Two, Three;\n" +
+ " }\n" +
+ " \n" +
+ " public <T extends Cloneable> T getOne(Class enumType) {\n" +
+ " EnumSet<? extends T> set = EnumSet.allOf(enumType);\n" +
+ " return set.iterator().next();\n" +
+ " }\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. WARNING in EnumTest.java (at line 8)\n" +
+ " public <T extends Cloneable> T getOne(Class enumType) {\n" +
+ " ^^^^^\n" +
+ "Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+ "----------\n" +
+ "2. WARNING in EnumTest.java (at line 9)\n" +
+ " EnumSet<? extends T> set = EnumSet.allOf(enumType);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: Unchecked invocation allOf(Class) of the generic method allOf(Class<E>) of type EnumSet\n" +
+ "----------\n" +
+ "3. WARNING in EnumTest.java (at line 9)\n" +
+ " EnumSet<? extends T> set = EnumSet.allOf(enumType);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: The expression of type EnumSet needs unchecked conversion to conform to EnumSet<? extends T>\n" +
+ "----------\n" +
+ "4. WARNING in EnumTest.java (at line 9)\n" +
+ " EnumSet<? extends T> set = EnumSet.allOf(enumType);\n" +
+ " ^^^^^^^^\n" +
+ (this.complianceLevel < ClassFileConstants.JDK1_8
+ ? "Type safety: The expression of type Class needs unchecked conversion to conform to Class<T&Enum<T&Enum<E>>>\n"
+ : "Type safety: The expression of type Class needs unchecked conversion to conform to Class<Enum<Enum<E>>>\n") +
+ "----------\n");
+}
+// simple conflict introduced by additional wildcard bound
+public void testBug456459b() {
+ runNegativeTest(
+ new String[] {
+ "EnumTest.java",
+ "import java.util.EnumSet;\n" +
+ "public class EnumTest {\n" +
+ " \n" +
+ " static enum Cloneables implements Cloneable {\n" +
+ " One, Two, Three;\n" +
+ " }\n" +
+ " \n" +
+ " public void getOne(Class enumType) {\n" +
+ " EnumSet<? extends EnumTest> set = null;\n" +
+ " }\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. WARNING in EnumTest.java (at line 8)\n" +
+ " public void getOne(Class enumType) {\n" +
+ " ^^^^^\n" +
+ "Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+ "----------\n" +
+ "2. ERROR in EnumTest.java (at line 9)\n" +
+ " EnumSet<? extends EnumTest> set = null;\n" +
+ " ^^^^^^^^^^^^^^^^^^\n" +
+ "Bound mismatch: The type ? extends EnumTest is not a valid substitute for the bounded parameter <E extends Enum<E>> of the type EnumSet<E>\n" +
+ "----------\n");
+}
+// indirect conflict via wildcard's bound's bound.
+public void testBug456459c() {
+ runNegativeTest(
+ new String[] {
+ "X.java",
+ "class A {};\n" +
+ "class B {};\n" +
+ "public class X<T extends A> {\n" +
+ " <U extends B> void m() {\n" +
+ " X<? extends U> l = null;\n" +
+ " }\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. ERROR in X.java (at line 5)\n" +
+ " X<? extends U> l = null;\n" +
+ " ^^^^^^^^^^^\n" +
+ "Bound mismatch: The type ? extends U is not a valid substitute for the bounded parameter <T extends A> of the type X<T>\n" +
+ "----------\n");
+}
+public void testBug456924() {
+ runConformTest(
+ new String[] {
+ "Test1.java",
+ "class Test1<E> {\n" +
+ " <T extends Test1<T>> void method1(Class<T> t) {\n" +
+ " Test2<? super T> test2 = getTest2(t);\n" +
+ " // getTest2(t); // --> no error\n" +
+ " }\n" +
+ " <T extends Test1<T>> Test2<? super T> getTest2(Class<T> t){\n" +
+ " return null;\n" +
+ " }\n" +
+ " \n" +
+ "}\n" +
+ "\n",
+ "Test2.java",
+ "class Test2<E extends Test1<E>>{}\n"
+ });
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_7.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_7.java
index 37ac1bb..22caeb9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_7.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_7.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 IBM Corporation.
+ * Copyright (c) 2011, 2015 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
* Bug 400874 - [1.8][compiler] Inference infrastructure should evolve to meet JLS8 18.x (Part G of JSR335 spec)
* Bug 424205 - [1.8] Cannot infer type for diamond type with lambda on method invocation
* Bug 429203 - [1.8][compiler] NPE in AllocationExpression.binding
+ * Bug 456508 - Unexpected RHS PolyTypeBinding for: <code-snippet>
*******************************************************************************/
package org.eclipse.jdt.core.tests.compiler.regression;
@@ -20,10 +21,12 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import junit.framework.Test;
+
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class GenericsRegressionTest_1_7 extends AbstractRegressionTest {
static {
-// TESTS_NAMES = new String[] { "test0056c" };
+// TESTS_NAMES = new String[] { "testBug456508" };
// TESTS_NUMBERS = new int[] { 40, 41, 43, 45, 63, 64 };
// TESTS_RANGE = new int[] { 11, -1 };
}
@@ -2936,6 +2939,48 @@
},
"");
}
+public void testBug456508() {
+ runNegativeTest(
+ new String[] {
+ "QueryAtom.java",
+ "public class QueryAtom<T, P> {\n" +
+ " public QueryAtom(SingularAttribute<? super T, P> path) {\n" +
+ " }\n" +
+ "}\n",
+ "SubqueryIn.java",
+ "public class SubqueryIn<S, P> {\n" +
+ " public SubqueryIn(QueryAtom<S, P>... subqueryAtoms) {\n" +
+ " }\n" +
+ "}\n",
+ "Test.java",
+ "class PAccount {}\n" +
+ "class PGroepAccount {}\n" +
+ "interface SingularAttribute<X, T> {}\n" +
+ "\n" +
+ "public class Test {\n" +
+ " public static volatile SingularAttribute<PGroepAccount, PAccount> account;\n" +
+ "\n" +
+ " public void nietInGroep() {\n" +
+ " recordFilter(new SubqueryIn<>(new QueryAtom<>(account)));\n" +
+ " }\n" +
+ "\n" +
+ " protected <P> void recordFilter(SubqueryIn<?, P> atom) {\n" +
+ " }\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. WARNING in SubqueryIn.java (at line 2)\n" +
+ " public SubqueryIn(QueryAtom<S, P>... subqueryAtoms) {\n" +
+ " ^^^^^^^^^^^^^\n" +
+ "Type safety: Potential heap pollution via varargs parameter subqueryAtoms\n" +
+ "----------\n" +
+ "----------\n" +
+ "1. WARNING in Test.java (at line 9)\n" +
+ " recordFilter(new SubqueryIn<>(new QueryAtom<>(account)));\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Type safety: A generic array of QueryAtom<PGroepAccount,PAccount> is created for a varargs parameter\n" +
+ "----------\n");
+}
public static Class testClass() {
return GenericsRegressionTest_1_7.class;
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
index f9850d3..4757be9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 GK Software AG, and others.
+ * Copyright (c) 2013, 2015 GK Software AG, 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
@@ -18,6 +18,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class GenericsRegressionTest_1_8 extends AbstractRegressionTest {
static {
@@ -4991,4 +4992,24 @@
"}\n"
});
}
-}
\ No newline at end of file
+public void testBug457079() {
+ runConformTest(
+ new String[] {
+ "Foo.java",
+ "import java.util.Collections;\n" +
+ "import java.util.Map;\n" +
+ "import java.util.Set;\n" +
+ "import java.util.function.Function;\n" +
+ "\n" +
+ "class Foo {\n" +
+ " static <K, V> Map<K, V> foo(K value, Function<? super K, V> function) {\n" +
+ " return null;\n" +
+ " }\n" +
+ "\n" +
+ " static void bar(Set<String> set) {\n" +
+ " Map<String, Set<String>> map = foo(\"\", e -> Collections.emptySet());\n" +
+ " }\n" +
+ "}\n"
+ });
+}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GrammarCoverageTests308.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GrammarCoverageTests308.java
index bb1d8c9..c9d81e2 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GrammarCoverageTests308.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GrammarCoverageTests308.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 IBM Corporation and others.
+ * Copyright (c) 2011, 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
@@ -14,6 +14,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class GrammarCoverageTests308 extends AbstractRegressionTest {
static {
@@ -1627,4 +1628,4 @@
"Marker cannot be resolved to a type\n" +
"----------\n");
}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java
index 89a3d14..9f3b36a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -20,6 +20,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class InitializationTests extends AbstractRegressionTest {
public InitializationTests(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java
index 6f71e70..bd0ae63 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class InnerClass15Test extends AbstractRegressionTest {
public InnerClass15Test(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java
index d1abd89..af86c2a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java
@@ -26,6 +26,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class InnerEmulationTest extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "Bug58069" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java
index f72261c..89bd3a4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -15,6 +15,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class InnerEmulationTest_1_5 extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "Bug58069" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofExpressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofExpressionTest.java
index 233eafd..493e3ca 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofExpressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofExpressionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 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
@@ -14,6 +14,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class InstanceofExpressionTest extends AbstractRegressionTest {
public InstanceofExpressionTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
index f8d916b..844bc14 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
@@ -24,6 +24,7 @@
// See https://bugs.eclipse.org/380501
// Bug 380501 - [1.8][compiler] Add support for default methods (JSR 335)
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class InterfaceMethodsTest extends AbstractComparableTest {
// Static initializer to specify tests subset using TESTS_* static variables
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalHexFloatTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalHexFloatTest.java
index ba59e30..b2dc6c7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalHexFloatTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalHexFloatTest.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
@@ -18,6 +18,7 @@
import org.eclipse.jdt.internal.compiler.util.FloatUtil;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class InternalHexFloatTest extends AbstractRegressionTest {
static class DoubleTest {
String input;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalScannerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalScannerTest.java
index 5be445d..fb044a4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalScannerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InternalScannerTest.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
@@ -15,6 +15,7 @@
import org.eclipse.jdt.core.compiler.InvalidInputException;
import org.eclipse.jdt.internal.compiler.parser.Scanner;
import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
+@SuppressWarnings({ "rawtypes" })
public class InternalScannerTest extends AbstractRegressionTest {
public InternalScannerTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR308SpecSnippetTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR308SpecSnippetTests.java
index 0f782ac..01503f4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR308SpecSnippetTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR308SpecSnippetTests.java
@@ -27,6 +27,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JSR308SpecSnippetTests extends AbstractRegressionTest {
static {
@@ -2913,4 +2914,4 @@
"\n";
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "Z", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR335ClassFileTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR335ClassFileTest.java
index 04f450f..af65cdd 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR335ClassFileTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR335ClassFileTest.java
@@ -23,6 +23,7 @@
import org.eclipse.jdt.core.util.ClassFormatException;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JSR335ClassFileTest extends AbstractComparableTest {
public JSR335ClassFileTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
index 9d9cf1d..3a96fa9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -19,6 +19,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.compiler.parser.JavadocTagConstants;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocBugsTest extends JavadocTest {
String docCommentSupport = CompilerOptions.ENABLED;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java
index e72f71c..8c8d60b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -23,6 +23,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public abstract class JavadocTest extends AbstractRegressionTest {
boolean useLibrary = false;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java
index 13375e6..f38d35b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTestForClass extends JavadocTest {
public static Test suite() {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForConstructor.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForConstructor.java
index bfd127c..21b4c52 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForConstructor.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForConstructor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTestForConstructor extends JavadocTest {
public JavadocTestForConstructor(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForField.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForField.java
index f71f87e..b01bc27 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForField.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForField.java
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTestForField extends JavadocTest {
public JavadocTestForField(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java
index d6b993b..54e0f68 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTestForInterface extends JavadocTest {
public JavadocTestForInterface(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
index 9d00e0d..e7cf7d7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTestForMethod extends JavadocTest {
public JavadocTestForMethod(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
index 67b866e..80c9ecb 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTestMixed extends JavadocTest {
String docCommentSupport = CompilerOptions.ENABLED;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java
index b066815..6118519 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java
@@ -28,6 +28,7 @@
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=46854"
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=46976"
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTestOptions extends JavadocTest {
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java
index 5c667a6..395d9eb 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTest_1_3 extends JavadocTest {
String docCommentSupport = CompilerOptions.ENABLED;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java
index 8d8eec6..2647315 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTest_1_4 extends JavadocTest {
String docCommentSupport = CompilerOptions.ENABLED;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
index b372da8..1cd7771 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JavadocTest_1_5 extends JavadocTest {
String docCommentSupport = CompilerOptions.ENABLED;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Jsr14Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Jsr14Test.java
index 5ee5d08..12b1cb7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Jsr14Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Jsr14Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -17,6 +17,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Jsr14Test extends AbstractRegressionTest {
public Jsr14Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
index 3b1c2bc..4b1a0bf 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 IBM Corporation and others.
+ * Copyright (c) 2011, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,6 +26,8 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import junit.framework.Test;
+
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class LambdaExpressionsTest extends AbstractRegressionTest {
static {
@@ -5581,6 +5583,26 @@
"Lambda expression's parameter y cannot redeclare another local variable defined in an enclosing scope. \n" +
"----------\n");
}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=456395, can't compile the Java8 code
+public void test456395() {
+ this.runConformTest(
+ new String[] {
+ "Test.java",
+ "import java.io.*;\n" +
+ "import java.util.*;\n" +
+ "import java.util.stream.*;\n" +
+ "import static java.util.stream.Collectors.*;\n" +
+ "public class Test {\n" +
+ " public static void main(String[] args) throws IOException {\n" +
+ " Stream<Locale> locales = Stream.of(Locale.getAvailableLocales());\n" +
+ " locales = Stream.of(Locale.getAvailableLocales());\n" +
+ " Map<String, Set<String>> countryToLanguages = locales.collect(\n" +
+ " groupingBy(Locale::getDisplayCountry, \n" +
+ " mapping(Locale::getDisplayLanguage,\n" +
+ " toSet())));\n" +
+ " }\n" +
+ "}\n"});
+}
public static Class testClass() {
return LambdaExpressionsTest.class;
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaRegressionTest.java
index 03b8dff..68dbd0d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaRegressionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 IBM Corporation and others.
+ * Copyright (c) 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
package org.eclipse.jdt.core.tests.compiler.regression;
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class LambdaRegressionTest extends AbstractRegressionTest {
static {
@@ -599,7 +600,89 @@
},
"");
}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=456481 - [1.8] VerifyError on constructor reference inside lambda
+public void testBug456481() {
+ this.runConformTest(new String [] {
+ "Test.java",
+ "public class Test {\n" +
+ " interface Constructor {\n" +
+ " MyTest execute();\n" +
+ " }\n" +
+ " interface ArrayConstructor {\n" +
+ " MyTest[] execute(int no);\n" +
+ " }\n" +
+ " interface ParameterizedConstructor {\n" +
+ " MyParameterizedTest<String> execute();\n" +
+ " }\n" +
+ " class MyTest {\n" +
+ " MyTest() { System.out.println(\"Constructor executed\"); }\n" +
+ " }\n" +
+ " class MyParameterizedTest<T> {\n" +
+ " MyParameterizedTest() {\n" +
+ " System.out.println(\"Parameterized Constructor executed\");\n" +
+ " }\n" +
+ " }\n" +
+ " public Constructor getConstructor() {\n" +
+ " return getConstructor(() -> { return MyTest::new; });\n" +
+ " }\n" +
+ " public MyTest[] getArray(int no) {\n" +
+ " return new MyTest[no];\n" +
+ " }\n" +
+ " ArrayConstructor getArrayConstructor() {\n" +
+ " return getArrayConstructor(() -> {return MyTest[]::new;});\n" +
+ " }\n" +
+ " ParameterizedConstructor getParameterizedConstructor() {\n" +
+ " return getParameterizedConstructor(() -> {return MyParameterizedTest<String>::new;});\n" +
+ " }\n" +
+ " ArrayConstructor getArrayConstructor(ArrayWrapper w) {\n" +
+ " return w.unwrap();\n" +
+ " }\n" +
+ " public static void main(String argv[]) {\n" +
+ " Test t = new Test();\n" +
+ " MyTest mytest = t.getConstructor().execute();\n" +
+ " MyTest[] array = t.getArrayConstructor().execute(2);\n" +
+ " MyParameterizedTest<String> pt = t.getParameterizedConstructor().execute();\n" +
+ " }\n" +
+ " ParameterizedConstructor getParameterizedConstructor(PTWrapper ptw) {\n" +
+ " return ptw.unwrap();\n" +
+ " }\n" +
+ " Constructor getConstructor(Wrapper arg) {\n" +
+ " return arg.unwrap();\n" +
+ " }\n" +
+ " interface PTWrapper {\n" +
+ " ParameterizedConstructor unwrap();\n" +
+ " }\n" +
+ " interface ArrayWrapper {\n" +
+ " ArrayConstructor unwrap();\n" +
+ " }\n" +
+ " interface Wrapper {\n" +
+ " Constructor unwrap();\n" +
+ " }\n" +
+ "}"
+ },
+ "Constructor executed\n" +
+ "Parameterized Constructor executed");
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=457007, VerifyError
+public void testBug457007() {
+ this.runConformTest(new String [] {
+ "Test.java",
+ "public class Test {\n" +
+ " void method() {\n" +
+ " class Bar {}\n" +
+ " java.util.function.Function<String, Bar> f = str -> new Bar();\n" +
+ " }\n" +
+ " public static void main(String[] args) {\n" +
+ " System.out.println(\"done\");\n" +
+ " }\n" +
+ "}"
+ },
+ "done");
+}
+
public static Class testClass() {
return LambdaRegressionTest.class;
}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaShapeTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaShapeTests.java
index 860704c..c3b9770 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaShapeTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaShapeTests.java
@@ -12,6 +12,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class LambdaShapeTests extends AbstractRegressionTest {
static {
// TESTS_NAMES = new String[] { "testWhileThis"};
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java
index 21de7be..747ccf4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -18,6 +18,7 @@
import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+@SuppressWarnings({ "rawtypes" })
public class LineNumberAttributeTest extends AbstractRegressionTest {
public LineNumberAttributeTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalVariableTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalVariableTest.java
index 96d9be9..6c4f4b4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalVariableTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalVariableTest.java
@@ -18,6 +18,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class LocalVariableTest extends AbstractRegressionTest {
public LocalVariableTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java
index 5f6c016..b1dadc3 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java
@@ -31,6 +31,7 @@
* Creation date: (8/2/00 12:04:53 PM)
* @author Dennis Conway
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class LookupTest extends AbstractRegressionTest {
public LookupTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ManifestAnalyzerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ManifestAnalyzerTest.java
index faa5033..133431b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ManifestAnalyzerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ManifestAnalyzerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.util.ManifestAnalyzer;
+@SuppressWarnings({ "rawtypes" })
public class ManifestAnalyzerTest extends AbstractRegressionTest {
private static final String FIRST_JAR = "firstJar.jar";
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java
index 146f3e6..3b21f4c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * Copyright (c) 2011, 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
@@ -20,6 +20,7 @@
/**
* Regression test for MethodHandle.invokeExact(..)/invokeGeneric(..) invocation
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class MethodHandleTest extends AbstractRegressionTest {
public MethodHandleTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodParametersAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodParametersAttributeTest.java
index 4f6daf2..2bb7707 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodParametersAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodParametersAttributeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 Jesper Steen Moeller and others.
+ * Copyright (c) 2013, 2014 Jesper Steen Moeller 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
@@ -24,6 +24,7 @@
import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class MethodParametersAttributeTest extends AbstractRegressionTest {
public MethodParametersAttributeTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
index 73953e0..d3f5e05 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
@@ -36,6 +36,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class MethodVerifyTest extends AbstractComparableTest {
static {
// TESTS_NAMES = new String[] { "testBug406928" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
index 619d9bb..ab3313f 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
@@ -30,6 +30,8 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import junit.framework.Test;
+
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NegativeLambdaExpressionsTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
index 86b8e34..62f1b8d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
@@ -18,6 +18,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NegativeTypeAnnotationTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NonFatalErrorTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NonFatalErrorTest.java
index 2db03cf..e7d516a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NonFatalErrorTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NonFatalErrorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -17,6 +17,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NonFatalErrorTest extends AbstractRegressionTest {
public NonFatalErrorTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
index 8dcd36f..b31d027 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2014 GK Software AG and others.
+ * Copyright (c) 2010, 2015 GK Software AG 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
@@ -25,6 +25,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
// see bug 186342 - [compiler][null] Using annotations for null checking
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NullAnnotationTest extends AbstractNullAnnotationTest {
private String TEST_JAR_SUFFIX = ".jar";
@@ -36,7 +37,7 @@
// Static initializer to specify tests subset using TESTS_* static variables
// All specified tests which do not belong to the class are skipped...
static {
-// TESTS_NAMES = new String[] { "testBug412076" };
+// TESTS_NAMES = new String[] { "test_default_nullness_003a" };
// TESTS_NUMBERS = new int[] { 561 };
// TESTS_RANGE = new int[] { 1, 2049 };
}
@@ -7878,4 +7879,178 @@
getCompilerOptions(),
"");
}
+public void testBug455557() {
+ runConformTestWithLibs(
+ new String[] {
+ "X.java",
+ "import java.util.List;\n" +
+ "\n" +
+ "import org.eclipse.jdt.annotation.NonNull;\n" +
+ "\n" +
+ "\n" +
+ "public class X {\n" +
+ " void test(List<String> list, boolean b) {\n" +
+ " if (b) {\n" +
+ " while (true) {\n" +
+ " for (@NonNull Object y : list) { \n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "}\n"
+ },
+ null,
+ "----------\n" +
+ "1. WARNING in X.java (at line 10)\n" +
+ " for (@NonNull Object y : list) { \n" +
+ " ^^^^\n" +
+ (this.complianceLevel < ClassFileConstants.JDK1_8
+ ? "Null type safety: The expression of type \'String\' needs unchecked conversion to conform to \'@NonNull Object\'\n"
+ : "Null type safety (type annotations): The expression of type \'String\' needs unchecked conversion to conform to \'@NonNull Object\'\n"
+ ) +
+ "----------\n");
+}
+public void testBug455723() {
+ runConformTestWithLibs(
+ new String[] {
+ "Problem.java",
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "public class Problem {\n" +
+ " public void fubar(final @Nullable String arg) {\n" +
+ " if (arg == null) {\n" +
+ " return;\n" +
+ " }\n" +
+ " \n" +
+ " doSomething(arg);\n" +
+ " // no errors here\n" +
+ " \n" +
+ " while (true) { \n" +
+ " doSomething(arg);\n" +
+ " // ^^^ compiler error\n" +
+ " }\n" +
+ " }\n" +
+ " \n" +
+ " private void doSomething(@NonNull String arg) { }\n" +
+ "}\n"
+ },
+ null,
+ "");
+}
+public void testBug455723b() {
+ runConformTestWithLibs(
+ new String[] {
+ "Problem.java",
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "public class Problem {\n" +
+ " public void fubar(final @Nullable String arg) {\n" +
+ " if (arg == null) {\n" +
+ " return;\n" +
+ " }\n" +
+ " @NonNull String local;\n" +
+ " \n" +
+ " while (true) { \n" +
+ " local = arg;\n" +
+ " }\n" +
+ " }\n" +
+ "}\n"
+ },
+ null,
+ "");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=436486
+public void test_null_with_apt() {
+ boolean apt = this.enableAPT;
+ this.enableAPT = true;
+ Map customOptions = getCompilerOptions();
+ customOptions.put(JavaCore.COMPILER_PB_MISSING_NONNULL_BY_DEFAULT_ANNOTATION, JavaCore.WARNING);
+ customOptions.put(JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN, JavaCore.ERROR);
+ runConformTestWithLibs(
+ new String[] {
+ "NullWarn.java",
+ "@SuppressWarnings(\"null\")\n" +
+ "public class NullWarn {\n" +
+ "\n" +
+ " // Some code\n" +
+ "\n" +
+ "}\n"
+ },
+ customOptions,
+ "");
+ this.enableAPT = apt;
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=436486#c4
+public void test_null_with_apt_comment4() {
+ boolean apt = this.enableAPT;
+ this.enableAPT = true;
+ Map customOptions = getCompilerOptions();
+ customOptions.put(JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN, JavaCore.ERROR);
+ runConformTestWithLibs(
+ new String[] {
+ "Test.java",
+ "import org.eclipse.jdt.annotation.NonNullByDefault;\n" +
+ "\n" +
+ "@NonNullByDefault\n" +
+ "public class Test {\n" +
+ "\n" +
+ " public static final Test t = new Test(Integer.valueOf(0));\n" +
+ "\n" +
+ " public Test(Integer integer) {\n" +
+ " \n" +
+ " }\n" +
+ "}\n"
+ },
+ customOptions,
+ "----------\n" +
+ "1. WARNING in Test.java (at line 6)\n" +
+ " public static final Test t = new Test(Integer.valueOf(0));\n" +
+ " ^^^^^^^^^^^^^^^^^^\n" +
+ (this.complianceLevel < ClassFileConstants.JDK1_8
+ ? "Null type safety: The expression of type \'Integer\' needs unchecked conversion to conform to \'@NonNull Integer\'\n"
+ : "Null type safety (type annotations): The expression of type \'Integer\' needs unchecked conversion to conform to \'@NonNull Integer\'\n"
+ ) +
+ "----------\n");
+ this.enableAPT = apt;
+}
+public void testBug457210() {
+ Map customOptions = getCompilerOptions();
+ customOptions.put(JavaCore.COMPILER_NULLABLE_ANNOTATION_NAME, "org.foo.Nullable");
+ customOptions.put(JavaCore.COMPILER_NONNULL_ANNOTATION_NAME, "org.foo.NonNull");
+ runNegativeTest(
+ new String[] {
+ "org/foo/NonNull.java",
+ "package org.foo;\n" +
+ "import java.lang.annotation.*;\n" +
+ "@Retention(RetentionPolicy.CLASS)\n" +
+ "public @interface NonNull {\n" +
+ "}\n",
+ "org/foo/Nullable.java",
+ "package org.foo;\n" +
+ "import java.lang.annotation.*;\n" +
+ "@Retention(RetentionPolicy.CLASS)\n" +
+ "public @interface Nullable {\n" +
+ "}\n",
+ "TestRunner.java",
+ "import org.foo.*;\n" +
+ "public class TestRunner {\n" +
+ " private TestRunner() {}\n" +
+ "\n" +
+ " @Nullable\n" +
+ " OutputHelper m_outputHelper;\n" +
+ " int foo(@NonNull OutputHelper helper) { return helper.i; }\n" +
+ "}\n",
+ "OutputHelper.java",
+ "@org.foo.NonNull public class OutputHelper {\n" +
+ " public int i;\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. ERROR in OutputHelper.java (at line 1)\n" +
+ " @org.foo.NonNull public class OutputHelper {\n" +
+ " ^^^^^^^^^^^^^^^^\n" +
+ "The nullness annotation \'NonNull\' is not applicable at this location\n" +
+ "----------\n",
+ null,
+ true,
+ customOptions);
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTests.java
index 89e9277..ccec78a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTests.java
@@ -53,6 +53,7 @@
* reference analysis. See NullReferenceTest for tests targetted at
* the source code compiler behavior level.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NullReferenceImplTests extends NullReferenceTest {
// Static initializer to specify tests subset using TESTS_* static variables
// All specified tests which does not belong to the class are skipped...
@@ -1494,6 +1495,7 @@
initializerStartMarker = "INITIALIZER START",
initializerEndMarker = "INITIALIZER END";
}
+@SuppressWarnings({ "unchecked", "rawtypes" })
class TransitiveClosureHolder {
static class Element {
NullReferenceImplTests.State value;
@@ -1580,6 +1582,7 @@
* Tooling the production of those literals buys us flexibility.
* {@link #printHelp printHelp} for details.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
class Generator {
static NullReferenceImplTests.State[] computeTransitiveClosure() {
TransitiveClosureHolder transitiveClosure = new TransitiveClosureHolder();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTransformations.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTransformations.java
index 9085544..fd02e62 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTransformations.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceImplTransformations.java
@@ -29,6 +29,8 @@
import org.eclipse.jdt.core.tests.compiler.regression.NullReferenceImplTests.State;
import org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo;
+
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NullReferenceImplTransformations {
public static final Transformation
markAsComparedEqualToNonNull =
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
index cfd4783..10401b2 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
@@ -55,6 +55,7 @@
/* See also NullReferenceImplTests for low level, implementation dependent
* tests. */
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NullReferenceTest extends AbstractRegressionTest {
public NullReferenceTest(String name) {
@@ -66,10 +67,10 @@
// Only the highest compliance level is run; add the VM argument
// -Dcompliance=1.4 (for example) to lower it if needed
static {
-// TESTS_NAMES = new String[] { "test0525_try_finally_unchecked_exception" };
-// TESTS_NAMES = new String[] { "testBug441737" };
-// TESTS_NAMES = new String[] { "testBug453305" };
-// TESTS_NAMES = new String[] { "testBug431016" };
+// TESTS_NAMES = new String[] { "testBug406160a" };
+// TESTS_NAMES = new String[] { "testBug384380" };
+// TESTS_NAMES = new String[] { "testBug384380_b" };
+// TESTS_NAMES = new String[] { "testBug321926a2" };
// TESTS_NAMES = new String[] { "testBug432109" };
// TESTS_NAMES = new String[] { "testBug418500" };
// TESTS_NUMBERS = new int[] { 561 };
@@ -12928,6 +12929,46 @@
"}"},
"Compiler good");
}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321926
+// need more precise info from the throw location
+public void testBug321926a2() {
+ if (this.complianceLevel < ClassFileConstants.JDK1_5) return; // uses @SW annotation
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN, JavaCore.ERROR);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "import java.io.IOException;\n" +
+ "public class X {\n" +
+ " @SuppressWarnings(\"null\")\n" + // expecting "redundant null check" at "if (someVariable == null)"
+ " public static void main(String[] args) {\n" +
+ " String someVariable = null;\n" +
+ " int i = 0;\n" +
+ " try {\n" +
+ " while (true) {\n" +
+ " if (i == 0){\n" +
+ " someVariable = \"not null\";\n" +
+ " i++;\n" +
+ " }\n" +
+ " else {\n" +
+ " someVariable = \"value\";\n" +
+ " throw new IOException();\n" +
+ " }\n" +
+ " }\n" +
+ " } catch (IOException e) {\n" +
+ " // broken from loop, continue on\n" +
+ " }\n" +
+ " if (someVariable == null) {\n" +
+ " System.out.println(\"Compiler buggy\");\n" +
+ " } else {\n" +
+ " System.out.println(\"Compiler good\");\n" +
+ " }\n" +
+ " }\n" +
+ "}"},
+ "Compiler good",
+ options);
+}
// Test that dead code warning does show up.
public void testBug321926b() {
this.runNegativeTest(
@@ -13369,6 +13410,9 @@
"Compiler good");
}
public void testBug321926n() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13397,9 +13441,13 @@
" }\n" +
" }\n" +
"}"},
- "Compiler good");
+ "Compiler good",
+ options);
}
public void testBug321926o() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13428,9 +13476,13 @@
" }\n" +
" }\n" +
"}"},
- "Compiler good");
+ "Compiler good",
+ options);
}
public void testBug321926p() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13459,7 +13511,8 @@
" }\n" +
" }\n" +
"}"},
- "Compiler good");
+ "Compiler good",
+ options);
}
public void testBug321926q() {
Map options = getCompilerOptions();
@@ -13590,6 +13643,8 @@
"Compiler good");
}
public void testBug321926u() {
+ Map options = getCompilerOptions();
+ options.put(CompilerOptions.OPTION_ReportRedundantNullCheck, CompilerOptions.IGNORE);
this.runConformTest(
new String[] {
"X.java",
@@ -13617,9 +13672,12 @@
" System.out.println(\"Compiler bad\");\n" +
" }\n" +
"}\n"},
- "Compiler good");
+ "Compiler good",
+ options);
}
public void testBug321926v() {
+ Map options = getCompilerOptions();
+ options.put(CompilerOptions.OPTION_ReportRedundantNullCheck, CompilerOptions.IGNORE);
this.runConformTest(
new String[] {
"X.java",
@@ -13647,10 +13705,14 @@
" System.out.println(\"Compiler good\");\n" +
" }\n" +
"}\n"},
- "Compiler good");
+ "Compiler good",
+ options);
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317829
public void testBug317829a() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13678,10 +13740,47 @@
" }\n" +
" }\n" +
"}"},
+ "Compiler good Compiler good",
+ options);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317829
+// assignment from unknown - not reporting redundant check
+public void testBug317829a2() {
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "import java.io.IOException;\n" +
+ "public class X {\n" +
+ " public static void main(String[] args) {\n" +
+ " String someVariable = null;\n" +
+ " int i = 0;\n" +
+ " try {\n" +
+ " someVariable = getString();\n" +
+ " while (true) {\n" +
+ " throw new IOException();\n" +
+ " }\n" +
+ " } catch (IOException e) {\n" +
+ " if (someVariable == null) {\n" +
+ " System.out.println(\"Compiler bad\");\n" +
+ " } else {\n" +
+ " System.out.print(\"Compiler good \");\n" +
+ " }\n" +
+ " }\n" +
+ " if (someVariable == null) {\n" +
+ " System.out.println(\"Compiler bad\");\n" +
+ " } else {\n" +
+ " System.out.println(\"Compiler good\");\n" +
+ " }\n" +
+ " }\n" +
+ " static String getString() { return \"\"; }\n" +
+ "}"},
"Compiler good Compiler good");
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=317829
public void testBug317829b() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13712,10 +13811,14 @@
" throw new IOException();\n" +
" }\n" +
"}"},
- "Compiler good Compiler good");
+ "Compiler good Compiler good",
+ options);
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317829
public void testBug317829c() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13743,10 +13846,14 @@
" }\n" +
" }\n" +
"}"},
- "Compiler good Compiler good");
+ "Compiler good Compiler good",
+ options);
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=317829
public void testBug317829d() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13777,10 +13884,14 @@
" throw new IOException();\n" +
" }\n" +
"}"},
- "Compiler good Compiler good");
+ "Compiler good Compiler good",
+ options);
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317829
public void testBug317829e() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13808,10 +13919,14 @@
" }\n" +
" }\n" +
"}"},
- "Compiler good Compiler good");
+ "Compiler good Compiler good",
+ options);
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317829
public void testBug317829f() {
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
+ options.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.WARNING);
this.runConformTest(
new String[] {
"X.java",
@@ -13842,7 +13957,8 @@
" throw new IOException();\n" +
" }\n" +
"}"},
- "Compiler good Compiler good");
+ "Compiler good Compiler good",
+ options);
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=292478 - Report potentially null across variable assignment
@@ -14574,6 +14690,74 @@
"-1");
}
+public void testBug406160a() {
+ if (this.complianceLevel < ClassFileConstants.JDK1_5)
+ return;
+ this.runConformTest(
+ new String[] {
+ "DeadCodeExample.java",
+ "public class DeadCodeExample {\n" +
+ "\n" +
+ " class CanceledException extends Exception {\n" +
+ " }\n" +
+ "\n" +
+ " private interface ProgressMonitor {\n" +
+ " boolean isCanceled();\n" +
+ " }\n" +
+ "\n" +
+ " private void checkForCancellation(ProgressMonitor monitor)\n" +
+ " throws CanceledException {\n" +
+ " if (monitor.isCanceled()) {\n" +
+ " throw new CanceledException();\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " private int run() {\n" +
+ "\n" +
+ " ProgressMonitor monitor = new ProgressMonitor() {\n" +
+ " private int i = 0;\n" +
+ "\n" +
+ " public boolean isCanceled() {\n" +
+ " return (++i == 5);\n" +
+ " }\n" +
+ " };\n" +
+ "\n" +
+ " Integer number = null;\n" +
+ "\n" +
+ " for (int j = 0; j < 1; ) {\n" +
+ "\n" +
+ " try {\n" +
+ " checkForCancellation(monitor);\n" +
+ "\n" +
+ " number = Integer.valueOf(0);\n" +
+ "\n" +
+ " for (String s : new String[10]) {\n" +
+ " checkForCancellation(monitor);\n" +
+ " number++;\n" +
+ " }\n" +
+ " return 0;\n" +
+ " } catch (CanceledException e) {\n" +
+ " System.out.println(\"Canceled after \" + number\n" +
+ " + \" times through the loop\");\n" +
+ " if (number != null) {\n" +
+ " System.out.println(\"number = \" + number);\n" +
+ " }\n" +
+ " return -1;\n" +
+ " }\n" +
+ " }\n" +
+ " return 13;\n" +
+ " }\n" +
+ "\n" +
+ " public static void main(String[] args) {\n" +
+ " System.out.println(new DeadCodeExample().run());\n" +
+ " }\n" +
+ "}\n"
+ },
+ "Canceled after 3 times through the loop\n" +
+ "number = 3\n" +
+ "-1");
+}
+
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=333089
// null analysis -- to make sure no AIOOBE or NPE is thrown while calling UnconditionalFlowInfo.markNullStatus(..)
public void testBug333089() {
@@ -16148,6 +16332,45 @@
"");
}
}
+// Bug 384380 - False positive on a "Potential null pointer access" after a continue
+// while & foreach loops
+public void testBug384380_b() {
+ if (this.complianceLevel >= ClassFileConstants.JDK1_5) {
+ this.runConformTest(
+ new String[] {
+ "Test.java",
+ "public class Test {\n" +
+ " public static class Container{\n" +
+ " public int property;\n" +
+ " }\n" +
+ " public static class CustomException extends Exception {\n" +
+ " private static final long serialVersionUID = 1L;\n" +
+ " }\n" +
+ " public static void anotherMethod() throws CustomException {}\n" +
+ "\n" +
+ " public static void method(final java.util.List<Container> list) {\n" +
+ " java.util.Iterator<Container> it = list.iterator();\n" +
+ " while (it.hasNext()) {\n" +
+ " final Container c = it.next();\n" +
+ " if(c == null)\n" +
+ " continue; // return or break, are fine though\n" +
+ "\n" +
+ " // without this try-catch+for+exception block it does not fails\n" +
+ " try {\n" +
+ " for(Container c1 : list) // needs a loop here (a 'while' or a 'for') to fail\n" +
+ " anotherMethod(); // throwing directly CustomException make it fails too\n" +
+ " } catch (final CustomException e) {\n" +
+ " // it fails even if catch is empty\n" +
+ " }\n" +
+ " c.property += 1; // \"Potential null pointer access: The variable c may be null at this location\"\n" +
+ " }\n" +
+ "\n" +
+ " }\n" +
+ "}\n"
+ },
+ "");
+ }
+}
public void testBug376263() {
Map customOptions = getCompilerOptions();
customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
@@ -17427,4 +17650,35 @@
"Null pointer access: The variable selectedNode can only be null at this location\n" +
"----------\n");
}
+// switch with fall-through nested in for:
+public void testBug451660() {
+ runNegativeTest(
+ new String[] {
+ "X.java",
+ "public class X {\n" +
+ " public static void main(String[] args)\n" +
+ " {\n" +
+ " String s = null;\n" +
+ " for(; true;) // ok with \"while(true)\"\n" +
+ " {\n" +
+ " switch(0)\n" +
+ " {\n" +
+ " default:\n" +
+ " s = \"Hello!\";\n" +
+ " case 1:\n" +
+ " System.out.println(s.toString());\n" +
+ " }\n" +
+ " return;\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. ERROR in X.java (at line 12)\n" +
+ " System.out.println(s.toString());\n" +
+ " ^\n" +
+ "Potential null pointer access: The variable s may be null at this location\n" +
+ "----------\n");
+}
}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTestAsserts.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTestAsserts.java
index 0b7be36..c314181 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTestAsserts.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTestAsserts.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 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
@@ -25,6 +25,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
/* See also NullReferenceTests for general null reference tests */
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NullReferenceTestAsserts extends AbstractRegressionTest {
// class libraries including org.eclipse.equinox.common
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
index d0d0055..9e941ff 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 GK Software AG and others.
+ * Copyright (c) 2012, 2015 GK Software AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
*******************************************************************************/
package org.eclipse.jdt.core.tests.compiler.regression;
+import java.io.File;
import java.util.Map;
import junit.framework.Test;
@@ -18,6 +19,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.tests.util.Util;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NullTypeAnnotationTest extends AbstractNullAnnotationTest {
public NullTypeAnnotationTest(String name) {
@@ -27,7 +29,7 @@
// Static initializer to specify tests subset using TESTS_* static variables
// All specified tests which do not belong to the class are skipped...
static {
-// TESTS_NAMES = new String[] { "testBug441693other" };
+// TESTS_NAMES = new String[] { "testBug456497" };
// TESTS_NUMBERS = new int[] { 561 };
// TESTS_RANGE = new int[] { 1, 2049 };
}
@@ -1702,12 +1704,12 @@
"1. WARNING in X.java (at line 6)\n" +
" return f == 0 ? good : dubious;\n" +
" ^^^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" +
+ "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\', corresponding supertype is 'List<String>'\n" +
"----------\n" +
"2. WARNING in X.java (at line 8)\n" +
" return f == 2 ? dubious : good;\n" +
" ^^^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" +
+ "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\', corresponding supertype is 'List<String>'\n" +
"----------\n");
}
@@ -2641,19 +2643,15 @@
" ^^^^^^\n" +
"Null type mismatch (type annotations): required \'X\' but this expression has type \'@Nullable X\', where 'X' is a free type variable\n" +
"----------\n" +
- "2. WARNING in PolyNull.java (at line 9)\n" +
- " return extract(i -> needNN(i), \"ola\");\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'String\' needs unchecked conversion to conform to \'@NonNull String\'\n" +
- "----------\n" +
- "3. ERROR in PolyNull.java (at line 9)\n" +
+ "2. ERROR in PolyNull.java (at line 9)\n" +
" return extract(i -> needNN(i), \"ola\");\n" +
" ^\n" +
"Null type mismatch (type annotations): required \'@NonNull String\' but this expression has type \'@Nullable String\'\n" +
"----------\n");
}
- // conflicting annotations from type variable application and type variable substitution -> exclude null annotations from inference
+ // seemingly conflicting annotations from type variable application and type variable substitution
+ // -> ignore @Nullable which overrides the type variable's nullness for this one location
public void testNullTypeInference3() {
Map compilerOptions = getCompilerOptions();
compilerOptions.put(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION, JavaCore.ERROR);
@@ -2665,7 +2663,7 @@
"public class Generics {\n" +
" <X> X m(@Nullable X a) { return null; }\n" +
" void test(@NonNull String in) {\n" +
- " @NonNull String s = m(in);\n" +
+ " @NonNull String s = m(in);\n" + // inferred OK as 'm(@Nullable String) -> @NonNull String'
" System.out.println(s.toLowerCase());\n" +
" }\n" +
" public static void main(String[] args) {\n" +
@@ -2679,11 +2677,6 @@
" <X> X m(@Nullable X a) { return null; }\n" +
" ^^^^\n" +
"Null type mismatch (type annotations): \'null\' is not compatible to the free type variable 'X'\n" +
- "----------\n" +
- "2. ERROR in Generics.java (at line 6)\n" +
- " @NonNull String s = m(in);\n" +
- " ^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'String\' needs unchecked conversion to conform to \'@NonNull String\'\n" +
"----------\n");
}
@@ -2747,12 +2740,12 @@
"1. WARNING in Generics.java (at line 13)\n" +
" Collection<@Nullable String> result = map1(inList, f);\n" +
" ^^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'@NonNull List<Object>\' needs unchecked conversion to conform to \'Collection<@NonNull Object>\'\n" +
+ "Null type safety (type annotations): The expression of type \'@NonNull List<Object>\' needs unchecked conversion to conform to \'Collection<@NonNull Object>\', corresponding supertype is 'Collection<Object>'\n" +
"----------\n" +
"2. WARNING in Generics.java (at line 14)\n" +
" map2(inList, f);\n" +
" ^^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'@NonNull List<Object>\' needs unchecked conversion to conform to \'Collection<@Nullable Object>\'\n" +
+ "Null type safety (type annotations): The expression of type \'@NonNull List<Object>\' needs unchecked conversion to conform to \'Collection<@Nullable Object>\', corresponding supertype is 'Collection<Object>'\n" +
"----------\n" +
"3. ERROR in Generics.java (at line 14)\n" +
" map2(inList, f);\n" +
@@ -3061,7 +3054,7 @@
"1. WARNING in X.java (at line 8)\n" +
" List<@NonNull ? extends @NonNull String> ls = new ArrayList<String>();\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'List<@NonNull ? extends @NonNull String>\'\n" +
+ "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'List<@NonNull ? extends @NonNull String>\', corresponding supertype is 'List<String>'\n" +
"----------\n" +
"2. ERROR in X.java (at line 9)\n" +
" ls.add(null);\n" +
@@ -3392,7 +3385,7 @@
"1. WARNING in X.java (at line 10)\n" +
" s.foo(new ArrayList<String>()); // (1)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'@NonNull List<@NonNull String>\'\n" +
+ "Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'@NonNull List<@NonNull String>\', corresponding supertype is 'List<String>'\n" +
"----------\n" +
"2. ERROR in X.java (at line 11)\n" +
" s.foo(null); // (2)\n" +
@@ -5673,7 +5666,7 @@
"1. ERROR in Test.java (at line 3)\n" +
" public <T> @org.eclipse.jdt.annotation.Nullable T foo(T arg) {\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "The return type is incompatible with 'T' returned from ITest.foo(T) (mismatching null constraints)\n" +
+ "The return type is incompatible with the free type variable 'T' returned from ITest.foo(T) (mismatching null constraints)\n" +
"----------\n" +
"----------\n" +
"1. ERROR in Test2.java (at line 3)\n" +
@@ -7298,4 +7291,296 @@
"Contradictory null annotations: method was inferred as \'@NonNull @Nullable Integer get(int)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" +
"----------\n");
}
+public void testBug453475() {
+ runConformTestWithLibs(
+ new String[] {
+ "TestMap.java",
+ "import java.util.*;\n" +
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "\n" +
+ "@NonNullByDefault\n" +
+ "public abstract class TestMap extends AbstractMap<String,@Nullable String> {\n" +
+ "\n" +
+ "}\n"
+ }, null, "");
+ runConformTestWithLibs(
+ new String[] {
+ "Test.java",
+ "import java.util.*;\n" +
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "\n" +
+ "@NonNullByDefault\n" +
+ "public class Test {\n" +
+ "\n" +
+ " public static final void test(TestMap testMap) {\n" +
+ " testMap.putAll(new HashMap<String,@Nullable String>()); // Error: Contradictory null annotations: method was inferred as 'void putAll(Map<? extends @NonNull String,? extends @NonNull @Nullable String>)', but only one of '@NonNull' and '@Nullable' can be effective at any location\n" +
+ " }\n" +
+ "\n" +
+ "}\n"
+ }, null, "");
+}
+// also: don't apply default to use of type variable
+public void testBug453475a() {
+ runConformTestWithLibs(
+ new String[] {
+ "NamespaceStorage.java",
+ "import java.util.*;\n" +
+ "@org.eclipse.jdt.annotation.NonNullByDefault\n" +
+ "public interface NamespaceStorage<T> \n" +
+ "{\n" +
+ "\n" +
+ " Set<T> getObjects(); \n" + // here <T> was wrongly read from .class as <@NonNull T>
+ " T getObject(T in);\n" +
+ "}\n"
+ }, null, "");
+ runConformTestWithLibs(
+ new String[] {
+ "NamespaceStorageImpl.java",
+ "import java.util.*;\n" +
+ "@org.eclipse.jdt.annotation.NonNullByDefault\n" +
+ "public class NamespaceStorageImpl<T> implements NamespaceStorage<T>\n" +
+ "{\n" +
+ " @Override\n" +
+ " public Set<T> getObjects() \n" +
+ " {\n" +
+ " return new TreeSet<T>();\n" +
+ " }\n" +
+ " @Override\n" +
+ " public T getObject(T in)\n" +
+ " {\n" +
+ " return in;\n" +
+ " }\n" +
+ "}\n"
+ },
+ null, "");
+}
+// also: don't apply default to wildcard
+public void testBug453475b() {
+ runConformTestWithLibs(
+ new String[] {
+ "X.java",
+ "import java.util.*;\n" +
+ "@org.eclipse.jdt.annotation.NonNullByDefault\n" +
+ "public interface X {\n" +
+ "\n" +
+ " void test(List<?> list);\n" + // here <?> was wrongly read from .class as <@NonNull ?>
+ " \n" +
+ "}\n"
+ }, null, "");
+ runConformTestWithLibs(
+ new String[] {
+ "Y.java",
+ "import java.util.*;\n" +
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "public class Y {\n" +
+ " public void run(X x, @NonNull List<@Nullable String> s) \n" +
+ " {\n" +
+ " x.test(s);\n" +
+ " }\n" +
+ "}\n"
+ },
+ null, "");
+}
+public void testBug456236() {
+ runConformTestWithLibs(
+ new String[] {
+ "Nullsafe.java",
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "class Nullsafe<T> {\n" +
+ " final @Nullable T t;\n" +
+ "\n" +
+ " Nullsafe(@Nullable T t) {\n" +
+ " this.t = t;\n" +
+ " }\n" +
+ " public static <U> Nullsafe<U> of(@Nullable U u) {\n" +
+ " return new Nullsafe<>(u); // compile error\n" +
+ " }\n" +
+ "}\n"
+ },
+ null,
+ "");
+}
+
+public void testBug456497() throws Exception {
+ runConformTestWithLibs(
+ new String[] {
+ "libs/Lib1.java",
+ "package libs;\n" +
+ "\n" +
+ "import java.util.Collection;\n" +
+ "import java.util.Iterator;\n" +
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "\n" +
+ "public interface Lib1 {\n" +
+ " <T> Iterator<T> unconstrainedTypeArguments1(Collection<@Nullable T> in);\n" +
+ " Iterator<@NonNull String> unconstrainedTypeArguments2(Collection<String> in);\n" +
+ "}\n",
+ "tests/Test1.java",
+ "package tests;\n" +
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "\n" +
+ "import java.util.Collection;\n" +
+ "import java.util.Iterator;\n" +
+ "\n" +
+ "import libs.Lib1;\n" +
+ "\n" +
+ "public class Test1 {\n" +
+ " Iterator<@NonNull String> test1(Lib1 lib, Collection<@Nullable String> coll) {\n" +
+ " return lib.unconstrainedTypeArguments1(coll);\n" +
+ " }\n" +
+ " Iterator<@NonNull String> test2(Lib1 lib, Collection<@Nullable String> coll) {\n" +
+ " return lib.unconstrainedTypeArguments2(coll);\n" +
+ " }\n" +
+ "}\n"
+ },
+ null,
+ "");
+}
+// original case
+public void testBug456487a() {
+ runConformTestWithLibs(
+ new String[]{
+ "Optional.java",
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "public class Optional<@NonNull T> {\n" +
+ " @Nullable T value;\n" +
+ " private Optional(T value) { this.value = value; }\n" +
+ " public static <@NonNull T> Optional<T> of(T value) { return new Optional<T>(value); }\n" +
+ " public T get() { \n" +
+ " @Nullable T t = this.value;\n" +
+ " if (t != null) return t; \n" +
+ " throw new RuntimeException(\"No value present\");\n" +
+ " }\n" +
+ " public @Nullable T orElse(@Nullable T other) { return (this.value != null) ? this.value : other; }\n" +
+ "}\n"
+ },
+ null,
+ "");
+}
+// witness for NPE in NullAnnotationMatching.providedNullTagBits:
+public void testBug456487b() {
+ runNegativeTestWithLibs(
+ new String[]{
+ "Optional.java",
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "public class Optional<@Nullable T> {\n" +
+ " @Nullable T value;\n" +
+ " private Optional(T value) { this.value = value; }\n" +
+ " public static <@NonNull T> Optional<T> of(T value) { return new Optional<T>(value); }\n" +
+ " public T get() { \n" +
+ " @Nullable T t = this.value;\n" +
+ " if (t != null) return t; \n" +
+ " throw new RuntimeException(\"No value present\");\n" +
+ " }\n" +
+ " public @Nullable T orElse(@Nullable T other) { return (this.value != null) ? this.value : other; }\n" +
+ "}\n",
+ "OTest.java",
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "@NonNullByDefault\n" +
+ "class OTest {\n" +
+ " public static void good() {\n" +
+ " Optional<String> os1 = Optional.of(\"yes\");\n" +
+ " @NonNull String s = os1.get();\n" +
+ " @Nullable String ns = os1.orElse(null);\n" +
+ " }\n" +
+ " public static void bad() {\n" +
+ " Optional<String> os = Optional.of(null);\n" +
+ " @NonNull String s = os.orElse(null);\n" +
+ " }\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. ERROR in Optional.java (at line 5)\n" +
+ " public static <@NonNull T> Optional<T> of(T value) { return new Optional<T>(value); }\n" +
+ " ^\n" +
+ "Null constraint mismatch: The type \'@NonNull T\' is not a valid substitute for the type parameter \'@Nullable T\'\n" +
+ "----------\n" +
+ "2. ERROR in Optional.java (at line 5)\n" +
+ " public static <@NonNull T> Optional<T> of(T value) { return new Optional<T>(value); }\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Contradictory null annotations: method was inferred as \'void <init>(@NonNull @Nullable T)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" +
+ "----------\n" +
+ "3. ERROR in Optional.java (at line 5)\n" +
+ " public static <@NonNull T> Optional<T> of(T value) { return new Optional<T>(value); }\n" +
+ " ^\n" +
+ "Null constraint mismatch: The type \'@NonNull T\' is not a valid substitute for the type parameter \'@Nullable T\'\n" +
+ "----------\n" +
+ "----------\n" +
+ "1. ERROR in OTest.java (at line 5)\n" +
+ " Optional<String> os1 = Optional.of(\"yes\");\n" +
+ " ^^^^^^\n" +
+ "Null constraint mismatch: The type \'@NonNull String\' is not a valid substitute for the type parameter \'@Nullable T\'\n" +
+ "----------\n" +
+ "2. ERROR in OTest.java (at line 6)\n" +
+ " @NonNull String s = os1.get();\n" +
+ " ^^^^^^^^^\n" +
+ "Contradictory null annotations: method was inferred as \'@NonNull @Nullable String get()\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" +
+ "----------\n" +
+ "3. ERROR in OTest.java (at line 7)\n" +
+ " @Nullable String ns = os1.orElse(null);\n" +
+ " ^^^^^^^^^^^^^^^^\n" +
+ "Contradictory null annotations: method was inferred as \'@NonNull @Nullable String orElse(@NonNull @Nullable String)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" +
+ "----------\n" +
+ "4. ERROR in OTest.java (at line 10)\n" +
+ " Optional<String> os = Optional.of(null);\n" +
+ " ^^^^^^\n" +
+ "Null constraint mismatch: The type \'@NonNull String\' is not a valid substitute for the type parameter \'@Nullable T\'\n" +
+ "----------\n" +
+ "5. ERROR in OTest.java (at line 10)\n" +
+ " Optional<String> os = Optional.of(null);\n" +
+ " ^^^^\n" +
+ "Null type mismatch: required \'@NonNull String\' but the provided value is null\n" +
+ "----------\n" +
+ "6. ERROR in OTest.java (at line 11)\n" +
+ " @NonNull String s = os.orElse(null);\n" +
+ " ^^^^^^^^^^^^^^^\n" +
+ "Contradictory null annotations: method was inferred as \'@NonNull @Nullable String orElse(@NonNull @Nullable String)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" +
+ "----------\n" +
+ "7. ERROR in OTest.java (at line 11)\n" +
+ " @NonNull String s = os.orElse(null);\n" +
+ " ^^^^^^^^^^^^^^^\n" +
+ "Null type mismatch: required \'@NonNull String\' but the provided value is inferred as @Nullable\n" +
+ "----------\n");
+}
+public void testBug454182() {
+
+ Map options = getCompilerOptions();
+ options.put(JavaCore.COMPILER_NONNULL_BY_DEFAULT_ANNOTATION_NAME, "annot.NonNullByDefault");
+ String[] libs = this.LIBS.clone();
+ libs[libs.length-1] = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test454182.jar";
+ runConformTest(
+ new String[] {
+ "p/package-info.java",
+ "@annot.NonNullByDefault package p;\n"
+ },
+ "",
+ libs,
+ false,
+ null,
+ options,
+ null);
+}
+public void testBug443870() {
+ runConformTestWithLibs(
+ new String[] {
+ "X.java",
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "interface Listener<T> {}\n" +
+ "interface I0<T,U extends Listener<T>> {}\n" +
+ "interface I1<T> extends I0<T,Listener<T>> {}\n" +
+ "class Y<S> {\n" +
+ " private @NonNull I0<S,Listener<S>> f;\n" +
+ " Y (@NonNull I0<S,Listener<S>> in) { this.f = in; }\n" +
+ " @NonNull I0<S,Listener<S>> getI() { return f; }\n" +
+ "}\n" +
+ "public class X<V> extends Y<V> {\n" +
+ " private @NonNull I1<V> f;\n" +
+ " X (@NonNull I1<V> in) { super(in); this.f = in; }\n" +
+ " @Override\n" +
+ " @NonNull I1<V> getI() { return f; }\n" +
+ "}\n"
+ },
+ null,
+ "");
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NumericTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NumericTest.java
index fc9c9b8..4d93871 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NumericTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NumericTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -12,6 +12,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class NumericTest extends AbstractRegressionTest {
public NumericTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/OverloadResolutionTest8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/OverloadResolutionTest8.java
index 11a9b38..5354e6a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/OverloadResolutionTest8.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/OverloadResolutionTest8.java
@@ -14,6 +14,7 @@
package org.eclipse.jdt.core.tests.compiler.regression;
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class OverloadResolutionTest8 extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java
index df9dd79..30f375a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation.
+ * Copyright (c) 2011, 2014 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class PolymorphicSignatureTest extends AbstractRegressionTest {
public PolymorphicSignatureTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemConstructorTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemConstructorTest.java
index 9293f66..0a5d630 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemConstructorTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemConstructorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -15,6 +15,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class ProblemConstructorTest extends AbstractRegressionTest {
public ProblemConstructorTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
index d2c0f2f..b5ce8c5 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -29,6 +29,7 @@
import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ProblemTypeAndMethodTest extends AbstractRegressionTest {
public ProblemTypeAndMethodTest(String name) {
super(name);
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 c7d2266..b97333c 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2011 IBM Corporation and others.
+ * Copyright (c) 2001, 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
@@ -23,10 +23,12 @@
import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
import junit.framework.Test;
/* Collects potential programming problems tests that are not segregated in a
* dedicated test class (aka NullReferenceTest). */
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ProgrammingProblemsTest extends AbstractRegressionTest {
public ProgrammingProblemsTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RepeatableAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RepeatableAnnotationTest.java
index ac50b4a..ae5f98b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RepeatableAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RepeatableAnnotationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 Jesper S Moller and others.
+ * Copyright (c) 2013, 2014 Jesper S Moller 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
@@ -25,6 +25,7 @@
import org.eclipse.jdt.internal.compiler.impl.IntConstant;
import org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;
+@SuppressWarnings({ "rawtypes" })
public class RepeatableAnnotationTest extends AbstractComparableTest {
// Static initializer to specify tests subset using TESTS_* static variables
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Requestor.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Requestor.java
index 6f0eafc..b1b8bf7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Requestor.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Requestor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -19,6 +19,7 @@
import org.eclipse.jdt.internal.compiler.CompilationResult;
import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
+@SuppressWarnings({ "rawtypes" })
public class Requestor implements ICompilerRequestor {
public boolean hasErrors = false;
public String outputPath;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java
index 2727d45..b622ff9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java
@@ -25,6 +25,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class ResourceLeakTests extends AbstractRegressionTest {
// well-known helper classes:
@@ -48,7 +49,7 @@
"}\n";
static {
-// TESTS_NAMES = new String[] { "testBug376053" };
+// TESTS_NAMES = new String[] { "testBug415790" };
// TESTS_NUMBERS = new int[] { 50 };
// TESTS_RANGE = new int[] { 11, -1 };
}
@@ -4788,4 +4789,65 @@
options
);
}
+public void testBug415790_ex2() {
+ if (this.complianceLevel < ClassFileConstants.JDK1_5)
+ return; // uses foreach
+ Map options = getCompilerOptions();
+ options.put(CompilerOptions.OPTION_ReportPotentiallyUnclosedCloseable, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_ReportUnclosedCloseable, CompilerOptions.ERROR);
+ runConformTest(
+ new String[] {
+ "X.java",
+ "import java.io.*;\n" +
+ "public class X {\n" +
+ " public void example2() throws IOException {\n" +
+ " for (final File file : new File[] { new File(\"/\") }) {\n" +
+ " BufferedReader reader = null;\n" +
+ " try {\n" +
+ " reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n" +
+ " }\n" +
+ " finally {\n" +
+ " try {\n" +
+ " reader.close();\n" +
+ " }\n" +
+ " catch (IOException e) {\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "" +
+ "}\n"
+ },
+ options);
+}
+public void testBug415790_ex4() {
+ Map options = getCompilerOptions();
+ options.put(CompilerOptions.OPTION_ReportPotentiallyUnclosedCloseable, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_ReportUnclosedCloseable, CompilerOptions.ERROR);
+ runConformTest(
+ new String[] {
+ "X.java",
+ "import java.io.*;\n" +
+ "public class X {\n" +
+ " public void example2(File[] files) throws IOException {\n" +
+ " for (int i = 0; i < files.length; i++) {\n" +
+ " File file = files[i];\n" +
+ " BufferedReader reader = null;\n" +
+ " try {\n" +
+ " reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n" +
+ " }\n" +
+ " finally {\n" +
+ " try {\n" +
+ " reader.close();\n" +
+ " }\n" +
+ " catch (IOException e) {\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ " }\n" +
+ "" +
+ "}\n"
+ },
+ options);
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RunComparableTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RunComparableTests.java
index bac3753..424cc02 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RunComparableTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RunComparableTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -22,6 +22,7 @@
/**
* Run all compiler regression tests
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class RunComparableTests extends junit.framework.TestCase {
public static ArrayList ALL_CLASSES = null;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java
index b84c5d1..1547adf 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RuntimeTests.java
@@ -18,6 +18,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class RuntimeTests extends AbstractRegressionTest {
public RuntimeTests(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java
index 4a40737..3216d70 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -22,6 +22,7 @@
import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
import org.eclipse.jdt.internal.core.util.PublicScanner;
+@SuppressWarnings({ "rawtypes" })
public class ScannerTest extends AbstractRegressionTest {
public ScannerTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerialVersionUIDTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerialVersionUIDTests.java
index 10ba9c7..87a2c73 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerialVersionUIDTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerialVersionUIDTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -22,6 +22,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SerialVersionUIDTests extends AbstractRegressionTest {
public SerialVersionUIDTests(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerializableLambdaTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerializableLambdaTest.java
index 9889d8f..e9111e8 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerializableLambdaTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SerializableLambdaTest.java
@@ -37,6 +37,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SerializableLambdaTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java
index 3197162..38fa3f0 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java
@@ -25,6 +25,7 @@
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class StackMapAttributeTest extends AbstractRegressionTest {
public StackMapAttributeTest(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
index d6cdcbd..b7b1910 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
@@ -17,6 +17,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class StaticImportTest extends AbstractComparableTest {
// Static initializer to specify tests subset using TESTS_* static variables
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SuperTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SuperTypeTest.java
index 1147e5a..3652594 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SuperTypeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SuperTypeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -14,8 +14,10 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import java.util.Map;
+
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SuperTypeTest extends AbstractRegressionTest {
public SuperTypeTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java
index 3fd288e..52db099 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java
@@ -26,6 +26,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SwitchTest extends AbstractRegressionTest {
private static final long JDKLevelSupportingStringSwitch = ClassFileConstants.JDK1_7;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
index a881877..518544c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
@@ -35,6 +35,7 @@
/**
* Run all compiler regression tests
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TestAll extends junit.framework.TestCase {
public TestAll(String testName) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatement17Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatement17Test.java
index 9718a1f..c1d9a36 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatement17Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatement17Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -12,6 +12,7 @@
package org.eclipse.jdt.core.tests.compiler.regression;
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class TryStatement17Test extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java
index d963925..cc6e336 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,8 @@
import org.eclipse.jdt.core.tests.util.Util;
import junit.framework.Test;
+
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TryStatementTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java
index f43e67d..802f002 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 IBM Corporation and others.
+ * Copyright (c) 2011, 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
@@ -20,6 +20,8 @@
import junit.framework.Test;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TryWithResourcesStatementTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java
index eb81eea..bc260b8 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java
@@ -29,6 +29,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TypeAnnotationTest extends AbstractRegressionTest {
static {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UnderscoresInLiteralsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UnderscoresInLiteralsTest.java
index cf487a1..32474c1 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UnderscoresInLiteralsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UnderscoresInLiteralsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 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
@@ -16,6 +16,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class UnderscoresInLiteralsTest extends AbstractRegressionTest {
static {
// TESTS_NUMBERS = new int[] { 24 };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Unicode18Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Unicode18Test.java
index 8bf25a0..ae5e6d5 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Unicode18Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Unicode18Test.java
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Unicode18Test extends AbstractRegressionTest {
public Unicode18Test(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UtilTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UtilTest.java
index 1ddee94..7213670 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UtilTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/UtilTest.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
@@ -19,6 +19,7 @@
//import junit.framework.AssertionFailedError;
import junit.framework.Test;
+@SuppressWarnings({ "rawtypes" })
public class UtilTest extends AbstractRegressionTest {
StringBuffer camelCaseErrors;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
index a75c14a..567cc94 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
@@ -26,6 +26,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class VarargsTest extends AbstractComparableTest {
public VarargsTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/XLargeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/XLargeTest.java
index 73c220d..572ce86 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/XLargeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/XLargeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -20,6 +20,7 @@
import junit.framework.Test;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class XLargeTest extends AbstractRegressionTest {
static {
// TESTS_NUMBERS = new int[] { 17 };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java
index bf7a1dc..dfa4957 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -39,8 +39,7 @@
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
import org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest;
-//{ObjectTeams: moved from org.eclipse.jdt.core.tests.dom:
-// avoid package overlap with tests.model to please our report generator
+@SuppressWarnings({ "rawtypes" })
public class StandAloneASTParserTest extends AbstractRegressionTest {
public StandAloneASTParserTest(String name) {
super(name);
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 a9a8197..fe8026f 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
@@ -26,6 +26,7 @@
* This assumes that the EvaluationContext class and that the EvaluationResult class
* are working correctly.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class CodeSnippetTest extends EvaluationTest {
/**
* Creates a new CodeSnippetTest.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationSetup.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationSetup.java
index 9eee707..ce13db0 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationSetup.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationSetup.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
@@ -28,6 +28,7 @@
import com.sun.jdi.connect.Connector;
import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class DebugEvaluationSetup extends EvaluationSetup {
VirtualMachine vm;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java
index 4252cdc..2f5a256 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java
@@ -34,6 +34,7 @@
import com.sun.jdi.VirtualMachine;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class DebugEvaluationTest extends EvaluationTest {
static {
// TESTS_NAMES = new String[] { "test069" };
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationTest.java
index 3f22f78..5b5631d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationTest.java
@@ -42,6 +42,7 @@
import org.eclipse.jdt.internal.eval.IRequestor;
import org.eclipse.jdt.internal.eval.InstallException;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class EvaluationTest extends AbstractCompilerTest implements StopableTestCase {
public class Requestor implements IRequestor {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/JDIStackFrame.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/JDIStackFrame.java
index efe4910..6f5e438 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/JDIStackFrame.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/JDIStackFrame.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -44,6 +44,7 @@
import com.sun.jdi.request.BreakpointRequest;
import com.sun.jdi.request.EventRequest;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JDIStackFrame implements EvaluationConstants, RuntimeConstants {
VirtualMachine jdiVM;
ThreadReference jdiThread;
@@ -135,12 +136,12 @@
}
}
ClassType clazz = (ClassType)classes.get(0);
- Method method = (Method)clazz.methodsByName(this.breakpointMethodName).get(0);
+ Method method = clazz.methodsByName(this.breakpointMethodName).get(0);
Location location;
if (this.breakpointLine < 0 || this.breakpointLine == Integer.MAX_VALUE) {
location = method.location();
} else {
- location = (Location)method.locationsOfLine(this.breakpointLine).get(0);
+ location = method.locationsOfLine(this.breakpointLine).get(0);
}
BreakpointRequest request = this.jdiVM.eventRequestManager().createBreakpointRequest(location);
request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
@@ -303,7 +304,7 @@
codeSnippetClass = (ClassType)classes.get(0);
// Create a new code snippet
- Method constructor = (Method)codeSnippetClass.methodsByName("<init>").get(0);
+ Method constructor = codeSnippetClass.methodsByName("<init>").get(0);
codeSnippet = codeSnippetClass.newInstance(this.jdiThread, constructor, new ArrayList(), ClassType.INVOKE_SINGLE_THREADED);
// Install local variables and "this" into generated fields
@@ -331,7 +332,7 @@
codeSnippetRunner = (ObjectReference)codeSnippetRunnerClass.getValue(theRunner);
// Get the method 'runCodeSnippet' and its arguments
- method = (Method)codeSnippetRunnerClass.methodsByName(RUN_CODE_SNIPPET_METHOD).get(0);
+ method = codeSnippetRunnerClass.methodsByName(RUN_CODE_SNIPPET_METHOD).get(0);
arguments = new ArrayList();
arguments.add(codeSnippet);
} catch (ClassNotLoadedException e) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java
index 81ea7a8..700cc59 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -25,6 +25,7 @@
* Negative tests for code snippet. Only compilation problems should be reported in
* these tests.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class NegativeCodeSnippetTest extends EvaluationTest implements ProblemSeverities, ProblemReasons {
/**
* Creates a new NegativeCodeSnippetTest.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java
index f254e95..4eb934a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.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
@@ -20,6 +20,7 @@
* Negative tests for variables. Only compilation problems should be reported in
* these tests.
*/
+@SuppressWarnings({ "rawtypes" })
public class NegativeVariableTest extends EvaluationTest implements ProblemSeverities, ProblemReasons {
/**
* Creates a new NegativeVariableTest.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationContext.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationContext.java
index 3272558..6555cd7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationContext.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationContext.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
@@ -20,6 +20,7 @@
* Sanity test the IEvaluationContext interface.
* For in depth tests, see VariableTest or CodeSnippetTest.
*/
+@SuppressWarnings({ "rawtypes" })
public class SanityTestEvaluationContext extends EvaluationTest {
/**
* Creates a new SanityEvaluationContextTest.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationResult.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationResult.java
index c15e59a..352b289 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationResult.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/SanityTestEvaluationResult.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
@@ -20,6 +20,7 @@
* Sanity test the IEvaluationResult interface.
* For in depth tests, see VariableTest or CodeSnippetTest.
*/
+@SuppressWarnings({ "rawtypes" })
public class SanityTestEvaluationResult extends EvaluationTest {
EvaluationResult result;
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/TestAll.java
index d8a6e89..4994dcf 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/TestAll.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
@@ -18,6 +18,7 @@
/**
* Run all tests defined in this package.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TestAll extends EvaluationTest {
public TestAll(String name) {
super(name);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/VariableTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/VariableTest.java
index 2000723..6c85160 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/VariableTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/VariableTest.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
@@ -18,6 +18,7 @@
* This assumes that the EvaluationContext class and that the GlobalVariable class
* are working correctly.
*/
+@SuppressWarnings({ "rawtypes" })
public class VariableTest extends EvaluationTest {
/**
* Creates a new EvaluationContextTest.
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetClassLoader.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetClassLoader.java
index d1d2d69..979ec3c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetClassLoader.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetClassLoader.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
@@ -16,6 +16,7 @@
* A code snippet class loader is a class loader that loads code snippet classes and global
* variable classes.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class CodeSnippetClassLoader extends ClassLoader {
/**
* Whether the code snippet support classes should be given by the IDE
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetRunner.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetRunner.java
index 8bbb6d6..068970c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetRunner.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetRunner.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
@@ -37,6 +37,7 @@
* loader can load such a class.
* </ul>
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class CodeSnippetRunner {
public static CodeSnippetRunner theRunner;
static final String CODE_SNIPPET_CLASS_NAME = "org.eclipse.jdt.internal.eval.target.CodeSnippet";
@@ -227,7 +228,7 @@
try {
Class clazz = Class.forName(args[mainClass]);
Method mainMethod = clazz.getMethod("main", new Class[] {String[].class});
- mainMethod.invoke(null, new String[][] {mainArgs});
+ mainMethod.invoke(null, (Object[]) mainArgs);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/IDEInterface.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/IDEInterface.java
index 130e096..d91a9a9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/IDEInterface.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/IDEInterface.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 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
@@ -37,6 +37,7 @@
* </pre>
* This sequence is infinitely repeated until the output socket stream is closed.
*/
+@SuppressWarnings({ "rawtypes" })
public class IDEInterface {
/**
* Whether timing info should be printed to stdout
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/PerformanceTestSuite.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/PerformanceTestSuite.java
index fc02ed5..0b45c02 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/PerformanceTestSuite.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/PerformanceTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 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
@@ -18,6 +18,7 @@
import junit.framework.TestCase;
import junit.framework.TestSuite;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class PerformanceTestSuite extends TestSuite {
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java
index 4d99aa4..3688b58 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java
@@ -42,6 +42,7 @@
import org.eclipse.test.performance.Performance;
import org.eclipse.test.performance.PerformanceTestCase;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TestCase extends PerformanceTestCase {
// Filters
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestResult.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestResult.java
index 813005a..10b8c63 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestResult.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestResult.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
@@ -13,6 +13,7 @@
import java.util.*;
import junit.framework.*;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class TestResult extends junit.framework.TestResult {
TestCase currentTest;
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/DRLVMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/DRLVMLauncher.java
index a43ea9d..b8b7e7f 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/DRLVMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/DRLVMLauncher.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
@@ -19,6 +19,7 @@
* This is a new vm launcher to support Apache Harmony
* (http://harmony.apache.org) settings
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class DRLVMLauncher extends StandardVMLauncher {
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/J9VMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/J9VMLauncher.java
index 764b73a..2963561 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/J9VMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/J9VMLauncher.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
@@ -26,6 +26,7 @@
* must also be specified. This port is used for the communication between the
* Proxy and the VM.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class J9VMLauncher extends LocalVMLauncher {
int internalDebugPort = -1;
String proxyOutFile;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/JRockitVMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/JRockitVMLauncher.java
index ee71668..9caf8c7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/JRockitVMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/JRockitVMLauncher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -22,6 +22,7 @@
* A standard VM launcher launches an external standard VM with
* the given arguments on the same machine.
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class JRockitVMLauncher extends LocalVMLauncher {
String batchFileName;
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java
index 6f5fa63..2c88d96 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/LocalVMLauncher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -27,6 +27,7 @@
* instances will be able to retrieve only a part of the running VMs.
* </ul>
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public abstract class LocalVMLauncher implements RuntimeConstants {
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/MacVMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/MacVMLauncher.java
index 8b6768b..92ae40e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/MacVMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/MacVMLauncher.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
@@ -15,6 +15,7 @@
/**
* This is a new vm launcher to support sidecar settings
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class MacVMLauncher extends StandardVMLauncher {
/**
* @see LocalVMLauncher#getCommandLine
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarJ9VMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarJ9VMLauncher.java
index cf6194b..c4fa503 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarJ9VMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarJ9VMLauncher.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
@@ -15,6 +15,7 @@
/**
* This is a new vm launcher to support sidecar settings
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SideCarJ9VMLauncher extends StandardVMLauncher {
/**
* @see LocalVMLauncher#getCommandLine
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarVMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarVMLauncher.java
index 1cbd8ef..a6477de 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarVMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/SideCarVMLauncher.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
@@ -15,6 +15,7 @@
/**
* This is a new vm launcher to support sidecar settings
*/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class SideCarVMLauncher extends StandardVMLauncher {
/**
* @see LocalVMLauncher#getCommandLine
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/StandardVMLauncher.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/StandardVMLauncher.java
index efd73b4..3723e57 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/StandardVMLauncher.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/StandardVMLauncher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -25,6 +25,7 @@
* A standard VM launcher launches an external standard VM with
* the given arguments on the same machine.
*/
+@SuppressWarnings({ "rawtypes" ,"unchecked" })
public class StandardVMLauncher extends LocalVMLauncher {
String batchFileName;
/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
index ae41120..a5e4fd1 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
@@ -15,7 +15,6 @@
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
-
import java.util.List;
import java.util.Map;
@@ -29,6 +28,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class AbstractCompilerTest extends TestCase {
public static final int F_1_3 = 0x01;
@@ -44,6 +44,7 @@
private static int possibleComplianceLevels = UNINITIALIZED;
protected long complianceLevel;
+ protected boolean enableAPT = false;
/**
* Build a test suite made of test suites for all possible running VM compliances .
@@ -517,6 +518,7 @@
public void initialize(CompilerTestSetup setUp) {
this.complianceLevel = setUp.complianceLevel;
+ this.enableAPT = System.getProperty("enableAPT") != null;
}
protected String testName() {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/CompilerTestSetup.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/CompilerTestSetup.java
index 9d55920..3dc9512 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/CompilerTestSetup.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/CompilerTestSetup.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
@@ -17,6 +17,7 @@
import junit.framework.TestResult;
import junit.framework.TestSuite;
+@SuppressWarnings({ "rawtypes" })
public class CompilerTestSetup extends TestSuite {
long complianceLevel;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java
index a0e5c3e..ce7b35c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -38,6 +38,7 @@
import org.eclipse.jdt.internal.compiler.problem.DefaultProblem;
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class Util {
// Trace for delete operation
/*
@@ -1293,20 +1294,18 @@
public static void writeToFile(String contents, String destinationFilePath) {
File destFile = new File(destinationFilePath);
FileOutputStream output = null;
+ PrintWriter writer = null;
try {
output = new FileOutputStream(destFile);
- PrintWriter writer = new PrintWriter(output);
+ writer = new PrintWriter(output);
writer.print(contents);
writer.flush();
} catch (IOException e) {
e.printStackTrace();
return;
} finally {
- if (output != null) {
- try {
- output.close();
- } catch (IOException e2) {
- }
+ if (writer != null) {
+ writer.close();
}
}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/VerifyTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/VerifyTests.java
index d36baa0..0fc1cf7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/VerifyTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/VerifyTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -30,6 +30,7 @@
*
******************************************************/
+@SuppressWarnings({ "unchecked", "rawtypes" })
public class VerifyTests {
int portNumber;
Socket socket;
diff --git a/org.eclipse.jdt.core.tests.compiler/workspace/Test454182.jar b/org.eclipse.jdt.core.tests.compiler/workspace/Test454182.jar
new file mode 100644
index 0000000..d26c471
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/workspace/Test454182.jar
Binary files differ