aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2023-01-12 01:56:15 +0100
committerGitHub <noreply@github.com>2023-01-12 01:56:15 +0100
commit8bb4dc5daa8792e718e88c596812f232a2b73e6e (patch)
tree359d583cc91248be7eaf895e5d0371f1da555a27 /src/core/lombok/javac/handlers
parentb69ff85b9494a1a05a5763ef53069437328d443a (diff)
parent4feabb4d1e247f21134657a159727b6f6c9e2c94 (diff)
downloadlombok-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.java3
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);
}