diff options
author | Thomas Wolf | 2020-02-01 19:46:47 +0000 |
---|---|---|
committer | Thomas Wolf | 2020-02-01 19:54:25 +0000 |
commit | d4db6c5c6dd5bcf805c791e56f3a2b6cdbb77167 (patch) | |
tree | c379427f6e8b469b616c6486eb052c49d0b39a3a | |
parent | dca945b44e00531039b6e9dc0e38efd6c65b498d (diff) | |
download | eclipse.jdt.core-d4db6c5c6dd5bcf805c791e56f3a2b6cdbb77167.tar.gz eclipse.jdt.core-d4db6c5c6dd5bcf805c791e56f3a2b6cdbb77167.tar.xz eclipse.jdt.core-d4db6c5c6dd5bcf805c791e56f3a2b6cdbb77167.zip |
Bug 559760 - Respect -failOnWarning in EclipseCompilerImpl
Return false if -failOnWarning was specified and there were warnings.
Change-Id: Ifd2a213003ec7dc00146d237567c9b025e6f9c94
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r-- | org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java | 7 |
1 files changed, 4 insertions, 3 deletions
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 e1a3998211..e5740bedc2 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 @@ -109,9 +109,10 @@ public class EclipseCompilerImpl extends Main { } finally { cleanup(); } - if (this.globalErrorsCount == 0) - return true; - return false; + if (this.failOnWarning && this.globalWarningsCount > 0) { + return false; + } + return this.globalErrorsCount == 0; } private void cleanup() { |