diff options
author | Olivier Thomann | 2007-11-07 17:05:55 +0000 |
---|---|---|
committer | Olivier Thomann | 2007-11-07 17:05:55 +0000 |
commit | f722c144cbd3d9ea00d9fcbd08f20190051637e3 (patch) | |
tree | 9ce7be15ac029079f864a5fed8e1320735ed9e17 /org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java | |
parent | 06cb2fb2cd016c5bb9806c77f9b924461e74f729 (diff) | |
download | eclipse.jdt.core-f722c144cbd3d9ea00d9fcbd08f20190051637e3.tar.gz eclipse.jdt.core-f722c144cbd3d9ea00d9fcbd08f20190051637e3.tar.xz eclipse.jdt.core-f722c144cbd3d9ea00d9fcbd08f20190051637e3.zip |
HEAD - Fix for 138018
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java')
-rw-r--r-- | org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java | 28 |
1 files changed, 27 insertions, 1 deletions
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 83707795c3..935facf902 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 @@ -37,7 +37,7 @@ public class BatchCompilerTest extends AbstractRegressionTest { static { // TESTS_NAMES = new String[] { "test000" }; -// TESTS_NUMBERS = new int[] { 24 }; +// TESTS_NUMBERS = new int[] { 152 }; // TESTS_RANGE = new int[] { 107, -1 }; } public BatchCompilerTest(String name) { @@ -5487,6 +5487,32 @@ public void test151_null_ref_options() { "", true); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=138018 +public void test152() { + this.runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " public static void foo() {\n" + + " String s = null;\n" + + " s.toString();\n" + + " }\n" + + " // Zork z;\n" + + "}", + }, + "\"" + OUTPUT_DIR + File.separator + "X.java\"" + + " -warn:-nullDereferences -proc:none -d \"" + OUTPUT_DIR + "\"", + "", + "invalid warning: nullDereferences. Ignoring warning and compiling\n" + + "----------\n" + + "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 4)\n" + + " s.toString();\n" + + " ^\n" + + "Null pointer access: The variable s can only be null at this location\n" + + "----------\n" + + "1 problem (1 warning)", + true); +} public static Class testClass() { return BatchCompilerTest.class; } |