mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 04:16:19 +00:00
fix for issue #423: @ExtensionMethods failed with an NPE in the handler on javac if generated constructors are involved.
This commit is contained in:
1 parent
cec7dfd190
commit
d15d722872
2 files changed
+9
-3
No files matched your search
@@ -3,8 +3,9 @@ Lombok Changelog
|
||||
|
||||
### v0.11.5 (Edgy Guinea Pig)
|
||||
* FEATURE: Lombok can be disabled entirely for any given compile run by using JVM switch `-Dlombok.disable`. This might be useful for code style checkers and such.
|
||||
* BUGFIX: {Delombok} Running delombok has been causing VerifyError errors when used with javac 1.7 since 0.11.0.
|
||||
* BUGFIX: A conflict between lombok and certain eclipse plugins would result in NullPointerExceptions in the log when using @Delegate.
|
||||
* BUGFIX: {Delombok} Running delombok has been causing VerifyError errors when used with javac 1.7 since 0.11.0. [Issue #422](http://code.google.com/p/projectlombok/issues/detail?id=422)
|
||||
* BUGFIX: A conflict between lombok and certain eclipse plugins would result in NullPointerExceptions in the log when using `@Delegate`.
|
||||
* BUGFIX: `NullPointerException in lombok.javac.handlers.JavacHandlerUtil.upToTypeNode(JavacHandlerUtil.java:978)` when compiling with `@ExtensionMethod` in javac and generated constructors are involved. [Issue #423](http://code.google.com/p/projectlombok/issues/detail?id=423)
|
||||
|
||||
### v0.11.4 (August 13th, 2012)
|
||||
* FEATURE: {Experimental} `@Value`, `@Wither` and `@FieldDefaults` are now available. These are a lot like `@Data` but geared towards immutable classes. [Documentation on @Value](http://projectlombok.org/features/experimental/Value.html), [Documentation on @Wither](http://projectlombok.org/features/experimental/Wither.html) and [Documentation on @FieldDefaults](http://projectlombok.org/features/experimental/FieldDefaults.html).
|
||||
|
||||
@@ -147,10 +147,15 @@ public class HandleExtensionMethod extends JavacAnnotationHandler<ExtensionMetho
|
||||
handleMethodCall((JCMethodInvocation) tree);
|
||||
return super.visitMethodInvocation(tree, p);
|
||||
}
|
||||
|
||||
|
||||
private void handleMethodCall(final JCMethodInvocation methodCall) {
|
||||
JavacNode methodCallNode = annotationNode.getAst().get(methodCall);
|
||||
|
||||
if (methodCallNode == null) {
|
||||
// This should mean the node does not exist in the source at all. This is the case for generated nodes, such as implicit super() calls.
|
||||
return;
|
||||
}
|
||||
|
||||
JavacNode surroundingType = upToTypeNode(methodCallNode);
|
||||
|
||||
TypeSymbol surroundingTypeSymbol = ((JCClassDecl)surroundingType.get()).sym;
|
||||
|
||||
Reference in new issue
Block a user