Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2020-05-27 22:32:53 +0000
committerJay Arthanareeswaran2020-06-26 06:30:13 +0000
commit34395cecb6b673f811ef9556ccfc09d17c96f9fc (patch)
tree8d18db46878ff4b836bb21690c9b564ae6c551b6 /org.eclipse.jdt.core/compiler/org/eclipse/jdt
parente8a8430665b53e3798f10bcfcd1a1703f0cfa7e3 (diff)
downloadeclipse.jdt.core-34395cecb6b673f811ef9556ccfc09d17c96f9fc.tar.gz
eclipse.jdt.core-34395cecb6b673f811ef9556ccfc09d17c96f9fc.tar.xz
eclipse.jdt.core-34395cecb6b673f811ef9556ccfc09d17c96f9fc.zip
Bug 563654 - EclipseCompiler reports suppressed warnings
EclipseCompiler produced extra reports of suppressed warnings through the DiagnosticListener. This can lead to suppressed warnings being reported, or to the same warning being reported several times. Add tests for EclipseCompiler and BatchCompiler for these cases. Change-Id: I4cfbab95ede9d96cc064acc3d32077f73127a9e3 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java4
1 files changed, 0 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
index 4c3c0c33dc..bfc5cb05fe 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
@@ -46,7 +46,6 @@ import org.eclipse.jdt.internal.compiler.parser.NLSTag;
import org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit;
import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
import org.eclipse.jdt.internal.compiler.problem.AbortType;
-import org.eclipse.jdt.internal.compiler.problem.DefaultProblem;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
import org.eclipse.jdt.internal.compiler.util.HashSetOfInt;
@@ -275,9 +274,6 @@ public void finalizeProblems() {
if (start < startSuppress) continue nextSuppress;
if (end > endSuppress) continue nextSuppress;
if (!this.suppressWarningIrritants[iSuppress].isSet(irritant)) {
- if (problem instanceof DefaultProblem) {
- ((DefaultProblem) problem).reportError();
- }
continue nextSuppress;
}
// discard suppressed warning

Back to the top