aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/HandleGetter.java
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2020-09-10 10:20:12 +0200
committerRawi01 <Rawi01@users.noreply.github.com>2020-09-10 10:32:14 +0200
commit0064c534273d9fb877f7e570f7a430060c88a5fb (patch)
treeee7089c1fbe948127aaea4c3317dd7dc18b0ee39 /src/core/lombok/eclipse/handlers/HandleGetter.java
parent9148294f78a8e646ee131ca182a9b692bc028fdb (diff)
downloadlombok-0064c534273d9fb877f7e570f7a430060c88a5fb.tar.gz
lombok-0064c534273d9fb877f7e570f7a430060c88a5fb.tar.bz2
lombok-0064c534273d9fb877f7e570f7a430060c88a5fb.zip
Add record support
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleGetter.java')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleGetter.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java
index 9cd1e2a1..755311b1 100644
--- a/src/core/lombok/eclipse/handlers/HandleGetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleGetter.java
@@ -90,13 +90,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
}
}
- TypeDeclaration typeDecl = null;
- if (typeNode.get() instanceof TypeDeclaration) typeDecl = (TypeDeclaration) typeNode.get();
- int modifiers = typeDecl == null ? 0 : typeDecl.modifiers;
- boolean notAClass = (modifiers &
- (ClassFileConstants.AccInterface | ClassFileConstants.AccAnnotation)) != 0;
-
- if (typeDecl == null || notAClass) {
+ if (!isClassOrEnum(typeNode)) {
pos.addError("@Getter is only supported on a class, an enum, or a field.");
return false;
}