diff options
3 files changed, 5 insertions, 10 deletions
diff --git a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java index dcb6b28d55..83133f16e0 100644 --- a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java +++ b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017 IBM Corporation and others. + * Copyright (c) 2017, 2018 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -725,10 +725,6 @@ public class CompilerToolJava9Tests extends TestCase { super.report(diagnostic); } - public int getErrorCount() { - return errorList.size(); - } - public boolean hasDiagnostic(String match) { for(Diagnostic<? extends JavaFileObject> d: errorList) { String msg = d.getMessage(Locale.US).toLowerCase(); diff --git a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java index d1f50cac62..15771d9acb 100644 --- a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java +++ b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java @@ -94,7 +94,7 @@ public class EclipseCompilerImpl extends Main { performCompilation(); } } catch(IllegalArgumentException e) { - diagnosticListener.report(new ExceptionDiagnostic(e)); + this.diagnosticListener.report(new ExceptionDiagnostic(e)); this.logger.logException(e); if (this.systemExitWhenFinished) { cleanup(); @@ -102,7 +102,7 @@ public class EclipseCompilerImpl extends Main { } return false; } catch (RuntimeException e) { // internal compiler failure - diagnosticListener.report(new ExceptionDiagnostic(e)); + this.diagnosticListener.report(new ExceptionDiagnostic(e)); e.printStackTrace(); this.logger.logException(e); return false; diff --git a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ExceptionDiagnostic.java b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ExceptionDiagnostic.java index 8822b364fc..5afe834969 100644 --- a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ExceptionDiagnostic.java +++ b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ExceptionDiagnostic.java @@ -17,7 +17,6 @@ import java.util.Locale; import javax.tools.Diagnostic; import javax.tools.JavaFileObject; -import javax.tools.Diagnostic.Kind; final class ExceptionDiagnostic implements Diagnostic<JavaFileObject> { private final Exception exception; @@ -28,7 +27,7 @@ final class ExceptionDiagnostic implements Diagnostic<JavaFileObject> { @Override public String getCode() { - return "exception"; + return "exception"; //$NON-NLS-1$ } @Override @@ -53,7 +52,7 @@ final class ExceptionDiagnostic implements Diagnostic<JavaFileObject> { @Override public String getMessage(Locale arg0) { - return exception.toString(); + return this.exception.toString(); } @Override |