peichhorn/lombok-pg — Issue #31: lombok crash
Author: spuckydaslama
Created: 2011-10-13 11:20:05+00:00
State: open

```
Error
Wed Oct 12 20:16:06 CEST 2011
Errors running builder 'Java Builder' on project 'metadataassistant'.

java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.getAnnotations(MethodBinding.java:510)
at lombok.eclipse.agent.PatchVisibleForTesting.handleVisibleForTestingOnMethod(PatchVisibleForTesting.java:86)
at lombok.eclipse.agent.PatchVisibleForTesting.onFindMethod(PatchVisibleForTesting.java:70)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2306)
at org.eclipse.jdt.internal.compiler.ast.CastExpression.checkAlternateBinding(CastExpression.java:260)
at org.eclipse.jdt.internal.compiler.ast.CastExpression.checkNeedForArgumentCasts(CastExpression.java:174)
at org.eclipse.jdt.internal.compiler.ast.ASTNode.checkInvocationArguments(ASTNode.java:347)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:493)
at lombok.eclipse.agent.PatchVal.skipResolveInitializerIfAlreadyCalled2(PatchVal.java:60)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:210)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:463)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:252)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:422)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1148)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1258)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:538)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:763)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
at java.lang.Thread.run(Thread.java:662)

eclipse.buildId=I20110613-1736
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86

----

Error
Wed Oct 12 20:16:06 CEST 2011
Errors running builder 'Java Builder' on project 'metadataassistant'.

java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.getAnnotations(MethodBinding.java:510)
at lombok.eclipse.agent.PatchVisibleForTesting.handleVisibleForTestingOnMethod(PatchVisibleForTesting.java:86)
at lombok.eclipse.agent.PatchVisibleForTesting.onFindMethod(PatchVisibleForTesting.java:70)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2306)
at org.eclipse.jdt.internal.compiler.ast.CastExpression.checkAlternateBinding(CastExpression.java:260)
at org.eclipse.jdt.internal.compiler.ast.CastExpression.checkNeedForArgumentCasts(CastExpression.java:174)
at org.eclipse.jdt.internal.compiler.ast.ASTNode.checkInvocationArguments(ASTNode.java:347)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:493)
at lombok.eclipse.agent.PatchVal.skipResolveInitializerIfAlreadyCalled2(PatchVal.java:60)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:210)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:463)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:252)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:422)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1148)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1258)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:538)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:763)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
at java.lang.Thread.run(Thread.java:662)

eclipse.buildId=I20110613-1736
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86
```

to reproduce
```
public class TestFile {
public static void main(String[] args) {
File[] test = new File("x").listFiles(null);
}
}
```