diff options
author | jay | 2018-11-13 09:25:51 +0000 |
---|---|---|
committer | jay | 2018-11-13 09:26:52 +0000 |
commit | 1a4189910ef18be935bd1b1663a6bf12bfaa2b75 (patch) | |
tree | 97c694062865a5bdaab42b37bc6a531a864f92c2 | |
parent | 8e07adc33a188e18e495d33021672ea64fc0668e (diff) | |
download | eclipse.jdt.core-1a4189910ef18be935bd1b1663a6bf12bfaa2b75.tar.gz eclipse.jdt.core-1a4189910ef18be935bd1b1663a6bf12bfaa2b75.tar.xz eclipse.jdt.core-1a4189910ef18be935bd1b1663a6bf12bfaa2b75.zip |
Fix warnings in official build
These were introduced by commit cecd785d6c8bf4a0ee586b3d786515e7a58e0e4f
Change-Id: I526840a2446243a28047b4f7372d8c74055f38e2
Signed-off-by: jay <jarthana@in.ibm.com>
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 |