Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Arthanareeswaran2020-09-22 22:52:11 -0400
committerJay Arthanareeswaran2020-09-22 22:52:11 -0400
commite7fbffe57eba5cf25acd0a5514843b11cfe75c98 (patch)
treeaf0cb8225fb608fd74a81377bee8290531d4aca7
parent6d6b8cebaca19dfc3cb6c41dd715ea9f85fa8652 (diff)
downloadeclipse.jdt.core-Y20201002-1200.tar.gz
eclipse.jdt.core-Y20201002-1200.tar.xz
eclipse.jdt.core-Y20201002-1200.zip
annotations Change-Id: I19a9d2ce5c55eb568de6066a8ddbf98a55ddb31e Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java3
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest_15.java1
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/target/CodeSnippetRunner.java18
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java2
-rw-r--r--org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java2
5 files changed, 19 insertions, 7 deletions
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 5816ad808a..c6cdf92db7 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
@@ -138,7 +138,6 @@ public abstract class AbstractRegressionTest extends AbstractCompilerTest implem
ASTVisitor visitor;
- @SuppressWarnings("synthetic-access")
protected void runConformTest() {
runTest(this.shouldFlushOutputDirectory,
this.testFiles,
@@ -164,7 +163,6 @@ public abstract class AbstractRegressionTest extends AbstractCompilerTest implem
this.skipJavac ? JavacTestOptions.SKIP : this.javacTestOptions);
}
- @SuppressWarnings("synthetic-access")
protected void runNegativeTest() {
runTest(this.shouldFlushOutputDirectory,
this.testFiles,
@@ -190,7 +188,6 @@ public abstract class AbstractRegressionTest extends AbstractCompilerTest implem
this.skipJavac ? JavacTestOptions.SKIP : this.javacTestOptions);
}
- @SuppressWarnings("synthetic-access")
protected void runWarningTest() {
runTest(this.shouldFlushOutputDirectory,
this.testFiles,
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest_15.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest_15.java
index 848fb0ecfe..0f8744558c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest_15.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest_15.java
@@ -92,7 +92,6 @@ public class LocalStaticsTest_15 extends AbstractRegressionTest {
runner.runWarningTest();
}
- @SuppressWarnings("unused")
private static void verifyClassFile(String expectedOutput, String classFileName, int mode)
throws IOException, ClassFormatException {
File f = new File(OUTPUT_DIR + File.separator + classFileName);
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 102ee6d844..0f292878e1 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
@@ -148,7 +148,7 @@ private String className(byte[] classDefinition) {
Object createCodeSnippet(Class snippetClass) {
Object object = null;
try {
- object = snippetClass.newInstance();
+ object = snippetClass.getDeclaredConstructor().newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
this.ide.sendResult(void.class, null);
@@ -157,6 +157,22 @@ Object createCodeSnippet(Class snippetClass) {
e.printStackTrace();
this.ide.sendResult(void.class, null);
return null;
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ this.ide.sendResult(void.class, null);
+ return null;
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ this.ide.sendResult(void.class, null);
+ return null;
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ this.ide.sendResult(void.class, null);
+ return null;
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ this.ide.sendResult(void.class, null);
+ return null;
}
return object;
}
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 5da30c5524..2a3ac760ec 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
@@ -209,7 +209,7 @@ public class AbstractCompilerTest extends TestCase {
TestSuite complianceSuite = null;
try {
Constructor constructor = setupClass.getConstructor(new Class[]{long.class});
- complianceSuite = (TestSuite)constructor.newInstance(new Object[]{new Long(complianceLevel)});
+ complianceSuite = (TestSuite)constructor.newInstance(new Object[]{Long.valueOf(complianceLevel)});
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java
index 7f24beb499..eb8cd3aaf6 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java
@@ -53,7 +53,7 @@ import org.eclipse.text.edits.TextEdit;
* @noinstantiate This class is not intended to be instantiated by clients.
* @noextend This class is not intended to be subclassed by clients.
*/
-@SuppressWarnings({"rawtypes", "unchecked"})
+@SuppressWarnings({"rawtypes"})
public class CodeFormatterApplication implements IApplication {
/**

Back to the top