From 65672f98ba0899ac1de88fc969059e90e4e75215 Mon Sep 17 00:00:00 2001 From: Ben Liblit Date: Wed, 30 Aug 2017 16:45:46 -0500 Subject: [PATCH] Suppress Eclipse warnings that arise in JLex, which we don't control --- .../.settings/org.eclipse.jdt.core.prefs | 2 +- com.ibm.wala.cast.java.test.data/src/CastFromNull.java | 1 - .../src/foo/bar/hello/world/LoopsAndLabels.java | 2 +- .../src/foo/bar/hello/world/Misc.java | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/com.ibm.wala.cast.java.test.data/.settings/org.eclipse.jdt.core.prefs b/com.ibm.wala.cast.java.test.data/.settings/org.eclipse.jdt.core.prefs index 908f43ae1..1e05aeb71 100644 --- a/com.ibm.wala.cast.java.test.data/.settings/org.eclipse.jdt.core.prefs +++ b/com.ibm.wala.cast.java.test.data/.settings/org.eclipse.jdt.core.prefs @@ -100,7 +100,7 @@ org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled diff --git a/com.ibm.wala.cast.java.test.data/src/CastFromNull.java b/com.ibm.wala.cast.java.test.data/src/CastFromNull.java index 554b6a849..56ca30685 100644 --- a/com.ibm.wala.cast.java.test.data/src/CastFromNull.java +++ b/com.ibm.wala.cast.java.test.data/src/CastFromNull.java @@ -9,7 +9,6 @@ * IBM Corporation - initial API and implementation *****************************************************************************/ public class CastFromNull { - @SuppressWarnings({ "cast" }) public static void main(String args[]) { new CastFromNull(); Object x = (Object) null; diff --git a/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/LoopsAndLabels.java b/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/LoopsAndLabels.java index ad2043317..019b8ec41 100644 --- a/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/LoopsAndLabels.java +++ b/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/LoopsAndLabels.java @@ -38,7 +38,7 @@ package foo.bar.hello.world; public class LoopsAndLabels { - @SuppressWarnings({ "cast", "unused" }) + @SuppressWarnings("unused") public static void main(String args[]) { aaa: do { diff --git a/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/Misc.java b/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/Misc.java index f3caa8723..3bce77f3a 100644 --- a/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/Misc.java +++ b/com.ibm.wala.cast.java.test.data/src/foo/bar/hello/world/Misc.java @@ -39,7 +39,6 @@ package foo.bar.hello.world; public class Misc { - @SuppressWarnings("cast") public static void main(String args[]) { if ( "hello" instanceof Object ) { System.out.println("strings are objects in java");