Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM N Palat2013-07-16 13:59:25 +0000
committerM N Palat2013-07-16 13:59:25 +0000
commitd09fa4802281032dbffe5d54191a48ffcdbfb895 (patch)
treee89e2ec097a8f3c4c893db48de200e96399287a2
parent88c7460e59173613af0d252f71b18fa99f4a3073 (diff)
downloadeclipse.jdt.core-d09fa4802281032dbffe5d54191a48ffcdbfb895.tar.gz
eclipse.jdt.core-d09fa4802281032dbffe5d54191a48ffcdbfb895.tar.xz
eclipse.jdt.core-d09fa4802281032dbffe5d54191a48ffcdbfb895.zip
Fix for Bug 4009077">4009077 [1.8][compiler] Illegal combination of modifiers on
interface methods produces confusing diagnostics
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java4
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties2
5 files changed, 9 insertions, 9 deletions
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 d0ef0e266d..54020f76dd 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
@@ -510,7 +510,7 @@ public void test011_problem_categories() {
expectedProblemAttributes.put("HierarchyCircularitySelfReference", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
expectedProblemAttributes.put("HierarchyHasProblems", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalAbstractStrictfpModifierCombinationForInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
expectedProblemAttributes.put("IllegalAccessFromTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
expectedProblemAttributes.put("IllegalAnnotationForBaseType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
expectedProblemAttributes.put("IllegalCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -1294,7 +1294,7 @@ public void test012_compiler_problems_tuning() {
expectedProblemAttributes.put("HierarchyCircularitySelfReference", SKIP);
expectedProblemAttributes.put("HierarchyHasProblems", SKIP);
expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod", SKIP);
- expectedProblemAttributes.put("IllegalAbstractStrictfpModifierCombinationForInterfaceMethod", SKIP);
+ expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod", SKIP);
expectedProblemAttributes.put("IllegalAccessFromTypeVariable", SKIP);
expectedProblemAttributes.put("IllegalAnnotationForBaseType", SKIP);
expectedProblemAttributes.put("IllegalCast", SKIP);
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 367866f22c..98c1d221b7 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
@@ -153,12 +153,12 @@ public class InterfaceMethodsTest extends AbstractComparableTest {
"2. ERROR in I.java (at line 6)\n" +
" strictfp void foo3();\n" +
" ^^^^^^\n" +
- "Illegal modifiers for the interface method foo3; strictfp is not permitted for abstract interface methods\n" +
+ "strictfp is not permitted for abstract interface method foo3\n" +
"----------\n" +
"3. ERROR in I.java (at line 7)\n" +
" public strictfp synchronized void foo4();\n" +
" ^^^^^^\n" +
- "Illegal modifiers for the interface method foo4; strictfp is not permitted for abstract interface methods\n" +
+ "strictfp is not permitted for abstract interface method foo4\n" +
"----------\n" +
"4. ERROR in I.java (at line 7)\n" +
" public strictfp synchronized void foo4();\n" +
@@ -168,7 +168,7 @@ public class InterfaceMethodsTest extends AbstractComparableTest {
"5. ERROR in I.java (at line 8)\n" +
" public strictfp synchronized @Annot void foo5();\n" +
" ^^^^^^\n" +
- "Illegal modifiers for the interface method foo5; strictfp is not permitted for abstract interface methods\n" +
+ "strictfp is not permitted for abstract interface method foo5\n" +
"----------\n" +
"6. ERROR in I.java (at line 8)\n" +
" public strictfp synchronized @Annot void foo5();\n" +
@@ -2068,7 +2068,7 @@ public class InterfaceMethodsTest extends AbstractComparableTest {
"2. ERROR in I.java (at line 3)\n" +
" public abstract default strictfp final void bar();}\n" +
" ^^^^^\n" +
- "Illegal modifiers for the interface method bar; strictfp is not permitted for abstract interface methods\n" +
+ "strictfp is not permitted for abstract interface method bar\n" +
"----------\n" +
"3. ERROR in I.java (at line 3)\n" +
" public abstract default strictfp final void bar();}\n" +
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
index f52ea75d66..178a636d99 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
@@ -1711,7 +1711,7 @@ void setSourceStart(int sourceStart);
/** @since 3.9 BETA_JAVA8 */
int IllegalModifierCombinationForInterfaceMethod = MethodRelated + 1056;
/** @since 3.9 BETA_JAVA8 */
- int IllegalAbstractStrictfpModifierCombinationForInterfaceMethod = MethodRelated + 1057;
+ int IllegalStrictfpForAbstractInterfaceMethod = MethodRelated + 1057;
/**
* External problems -- These are problems defined by other plugins
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index d4af206f88..94b4946893 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -2445,7 +2445,7 @@ public void illegalAbstractModifierCombinationForMethod(ReferenceBinding type, A
public void illegalAbstractModifierCombinationForMethod(AbstractMethodDeclaration methodDecl) {
String[] arguments = new String[] {new String(methodDecl.selector)};
this.handle(
- IProblem.IllegalAbstractStrictfpModifierCombinationForInterfaceMethod,
+ IProblem.IllegalStrictfpForAbstractInterfaceMethod,
arguments,
arguments,
methodDecl.sourceStart,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
index f2b733358b..82801b416f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -794,7 +794,7 @@
1054 = Illegal reference to super type {0}, cannot bypass the more specific direct super type {1}
1055 = Illegal reference to super method {0} from type {1}, cannot bypass the more specific override from type {2}
1056 = Illegal combination of modifiers for the interface method {0}; only one of abstract, default, or static permitted
-1057 = Illegal modifiers for the interface method {0}; strictfp is not permitted for abstract interface methods
+1057 = strictfp is not permitted for abstract interface method {0}
### ELABORATIONS
## Access restrictions

Back to the top