diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-10-23 11:19:35 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-10-23 11:19:35 +0200 |
commit | 614d490ea1477079ade277a95eb0cce123526842 (patch) | |
tree | cb41101dbb18f1d35f118eeb7bae40b4d7b0dcda /src/eclipseAgent/lombok/eclipse | |
parent | 10085d5f2a01cfefd9709b4745e58d8191a924d5 (diff) | |
download | lombok-614d490ea1477079ade277a95eb0cce123526842.tar.gz lombok-614d490ea1477079ade277a95eb0cce123526842.tar.bz2 lombok-614d490ea1477079ade277a95eb0cce123526842.zip |
Fix for NPEs in the eclipse log for
org.eclipse.jdt.internal.compiler.lookup.MethodBinding.sourceMethod(MethodBinding.java:1108)
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index 6908d623..6fdcfa63 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -620,7 +620,12 @@ public class PatchDelegate { method.arguments = new Argument[binding.parameters.length]; call.arguments = new Expression[method.arguments.length]; for (int i = 0; i < method.arguments.length; i++) { - AbstractMethodDeclaration sourceElem = pair.base.sourceMethod(); + AbstractMethodDeclaration sourceElem; + try { + sourceElem = pair.base.sourceMethod(); + } catch (Exception e) { + sourceElem = null; + } char[] argName; if (sourceElem == null) argName = ("arg" + i).toCharArray(); else { |