diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-05-28 13:03:54 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-05-30 20:26:20 +0200 |
commit | 7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9 (patch) | |
tree | d0f191ed53996636d86fd8c308337cd64c8bdd7e /src/core/lombok/eclipse/EclipseAstProblemView.java | |
parent | b3b91a0ddd1770f8646d27e421e2cfef96940f8f (diff) | |
download | lombok-7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9.tar.gz lombok-7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9.tar.bz2 lombok-7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9.zip |
Fixes for issue 470: VerifyErrors when using @SneakyThrows.
Diffstat (limited to 'src/core/lombok/eclipse/EclipseAstProblemView.java')
-rw-r--r-- | src/core/lombok/eclipse/EclipseAstProblemView.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/lombok/eclipse/EclipseAstProblemView.java b/src/core/lombok/eclipse/EclipseAstProblemView.java index a2d5b833..c1179666 100644 --- a/src/core/lombok/eclipse/EclipseAstProblemView.java +++ b/src/core/lombok/eclipse/EclipseAstProblemView.java @@ -3,7 +3,6 @@ package lombok.eclipse; import org.eclipse.jdt.core.compiler.CategorizedProblem; import org.eclipse.jdt.internal.compiler.CompilationResult; -import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.problem.DefaultProblem; import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities; import org.eclipse.jdt.internal.compiler.util.Util; @@ -13,14 +12,12 @@ public class EclipseAstProblemView { * Adds a problem to the provided CompilationResult object so that it will show up * in the Problems/Warnings view. */ - public static void addProblemToCompilationResult(CompilationUnitDeclaration ast, + public static void addProblemToCompilationResult(char[] fileNameArray, CompilationResult result, boolean isWarning, String message, int sourceStart, int sourceEnd) { - if (ast.compilationResult == null) return; - char[] fileNameArray = ast.getFileName(); + if (result == null) return; if (fileNameArray == null) fileNameArray = "(unknown).java".toCharArray(); int lineNumber = 0; int columnNumber = 1; - CompilationResult result = ast.compilationResult; int[] lineEnds = null; lineNumber = sourceStart >= 0 ? Util.getLineNumber(sourceStart, lineEnds = result.getLineSeparatorPositions(), 0, lineEnds.length-1) @@ -33,7 +30,7 @@ public class EclipseAstProblemView { fileNameArray, message, 0, new String[0], isWarning ? ProblemSeverities.Warning : ProblemSeverities.Error, sourceStart, sourceEnd, lineNumber, columnNumber); - ast.compilationResult.record(ecProblem, null); + result.record(ecProblem, null); } private static class LombokProblem extends DefaultProblem { |