diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2023-01-12 01:56:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 01:56:15 +0100 |
commit | 8bb4dc5daa8792e718e88c596812f232a2b73e6e (patch) | |
tree | 359d583cc91248be7eaf895e5d0371f1da555a27 /src/core/lombok/javac/handlers | |
parent | b69ff85b9494a1a05a5763ef53069437328d443a (diff) | |
parent | 4feabb4d1e247f21134657a159727b6f6c9e2c94 (diff) | |
download | lombok-8bb4dc5daa8792e718e88c596812f232a2b73e6e.tar.gz lombok-8bb4dc5daa8792e718e88c596812f232a2b73e6e.tar.bz2 lombok-8bb4dc5daa8792e718e88c596812f232a2b73e6e.zip |
Merge pull request #3312 from Rawi01/extensionmethod-nonstatic
Ignore non-static/non-public extension methods
Diffstat (limited to 'src/core/lombok/javac/handlers')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleExtensionMethod.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/HandleExtensionMethod.java b/src/core/lombok/javac/handlers/HandleExtensionMethod.java index 98b000c2..af03d000 100644 --- a/src/core/lombok/javac/handlers/HandleExtensionMethod.java +++ b/src/core/lombok/javac/handlers/HandleExtensionMethod.java @@ -117,7 +117,8 @@ public class HandleExtensionMethod extends JavacAnnotationHandler<ExtensionMetho if (tsym != null) for (Symbol member : tsym.getEnclosedElements()) { if (member.getKind() != ElementKind.METHOD) continue; MethodSymbol method = (MethodSymbol) member; - if ((method.flags() & (STATIC | PUBLIC)) == 0) continue; + if ((method.flags() & STATIC) == 0) continue; + if ((method.flags() & PUBLIC) == 0) continue; if (method.params().isEmpty()) continue; extensionMethods.add(method); } |