aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2022-12-11 17:15:58 +0100
committerRawi01 <Rawi01@users.noreply.github.com>2022-12-11 17:15:58 +0100
commit4feabb4d1e247f21134657a159727b6f6c9e2c94 (patch)
tree6ddd3b87c166ae171c583c11db242c43f8f393d8 /src/core
parent731bb185077918af8bc1e6a9e6bb538b2d3fbbd8 (diff)
downloadlombok-4feabb4d1e247f21134657a159727b6f6c9e2c94.tar.gz
lombok-4feabb4d1e247f21134657a159727b6f6c9e2c94.tar.bz2
lombok-4feabb4d1e247f21134657a159727b6f6c9e2c94.zip
[fixes #3310] Ignore non-static/non-public extension methods
Diffstat (limited to 'src/core')
-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 dd565f72..4fc71de6 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);
}