Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2018-09-02 08:19:45 +0000
committerTill Brychcy2018-09-05 20:01:22 +0000
commita4f6df84005c775e6159cf14d7e7b2626cf46d07 (patch)
treee4aa57e1d993328b5b074ad9e9ae6715916cf957
parentf9ab4e443a215f2737e288b877dccb5258b47217 (diff)
downloadeclipse.jdt.core-a4f6df84005c775e6159cf14d7e7b2626cf46d07.tar.gz
eclipse.jdt.core-a4f6df84005c775e6159cf14d7e7b2626cf46d07.tar.xz
eclipse.jdt.core-a4f6df84005c775e6159cf14d7e7b2626cf46d07.zip
Bug 537828 - Incorrect report : The field is defined in an inheritedI20180906-0005
type and an enclosing scope - Fix test name - Avoid warning that is not reported by javac Change-Id: I0771e95d69de22bdb533603577add171d6a1577e
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java12
1 files changed, 4 insertions, 8 deletions
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 d1a1d31ad3..be1b5a8af9 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
@@ -3512,11 +3512,11 @@ public void test106() {
runner.runWarningTest();
}
-public void testBug527828() {
+public void testBug537828() {
Map options = getCompilerOptions();
CompilerOptions compOptions = new CompilerOptions(options);
if (compOptions.complianceLevel < ClassFileConstants.JDK1_4) return;
- this.runNegativeTest(
+ this.runConformTest(
new String[] {
"FieldBug.java",//------------------------------
"class A {\n" +
@@ -3525,6 +3525,7 @@ public void testBug527828() {
"\n" +
"class B {\n" +
" private Object obj = \"B.obj\";\n" +
+ " public Object getObj() {return obj;}\n" +
"}\n" +
"\n" +
"public class FieldBug {\n" +
@@ -3541,12 +3542,7 @@ public void testBug527828() {
" }\n" +
"}",
},
- "----------\n" +
- "1. WARNING in FieldBug.java (at line 6)\n" +
- " private Object obj = \"B.obj\";\n" +
- " ^^^\n" +
- "The value of the field B.obj is not used\n" +
- "----------\n");
+ "A.obj");
}
public static Class testClass() { return LookupTest.class;
}

Back to the top