Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Arthanareeswaran2019-08-26 06:51:28 -0400
committerJay Arthanareeswaran2019-08-26 06:51:28 -0400
commitcadf5b022b631a8203a7b6c1f6d5d1aeda367ba1 (patch)
tree029f0db5fbc1e366a91d503ac8bdd667e77f1f7d
parentd2bc269c6942d63976845d0ab022d196f8cb7b82 (diff)
downloadeclipse.jdt.core-I20190827-0600.tar.gz
eclipse.jdt.core-I20190827-0600.tar.xz
eclipse.jdt.core-I20190827-0600.zip
Bug 550183 - Eclipse only issues a warning for name collision but JavacI20190827-0600
reports an error Change-Id: I832a2ae75913b1c97e995e7d2c8d51f3f9ad2be4 Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
-rw-r--r--org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java4
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java
index 7be3f8b9eb..11340bb252 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -109,7 +109,7 @@ public class PackageTests extends BuilderTests {
fullBuild();
expectingOnlySpecificProblemFor(aPath,
- new Problem("", "The type A collides with a package", aPath, 24, 25, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_WARNING)); //$NON-NLS-1$ //$NON-NLS-2$
+ new Problem("", "The type A collides with a package", aPath, 24, 25, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
expectingOnlySpecificProblemFor(bPath,
new Problem("", "The declared package \"\" does not match the expected package \"p.A\"", bPath, 0, 1, CategorizedProblem.CAT_INTERNAL, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
index 91d76e7547..3a1b07c49e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -2459,7 +2459,7 @@ public class StaticImportTest extends AbstractComparableTest {
"}\n",
},
"----------\n" +
- "1. WARNING in node\\Test.java (at line 2)\n" +
+ "1. ERROR in node\\Test.java (at line 2)\n" +
" public class Test {\n" +
" ^^^^\n" +
"The type Test collides with a package\n" +
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 bc42b7703c..6d95c7fc94 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
@@ -1601,7 +1601,7 @@ public int computeSeverity(int problemID){
case IProblem.VarargsConflict :
return ProblemSeverities.Warning;
case IProblem.TypeCollidesWithPackage :
- return ProblemSeverities.Warning;
+ return ProblemSeverities.Error;
/*
* Javadoc tags resolved references errors

Back to the top