aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/JavacHandlerUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac/handlers/JavacHandlerUtil.java')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
index acfc82c9..aa4e1bb2 100644
--- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java
+++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
@@ -294,19 +294,15 @@ public class JavacHandlerUtil {
JCVariableDecl decl = (JCVariableDecl)field.get();
JavacNode typeNode = field.up();
for (String potentialGetterName : toAllGetterNames(decl)) {
- switch (methodExists(potentialGetterName, typeNode, false)) {
- case EXISTS_BY_LOMBOK:
- case EXISTS_BY_USER:
- for (JavacNode potentialGetter : typeNode.down()) {
- if (potentialGetter.getKind() != Kind.METHOD) continue;
- JCMethodDecl method = (JCMethodDecl) potentialGetter.get();
- if (!method.name.contentEquals(potentialGetterName)) continue;
- /** static getX() methods don't count. */
- if ((method.mods.flags & Flags.STATIC) != 0) continue;
- /** Nor do getters with a non-empty parameter list. */
- if (method.params != null && method.params.size() > 0) continue;
- return new GetterMethod(method.name, method.restype);
- }
+ for (JavacNode potentialGetter : typeNode.down()) {
+ if (potentialGetter.getKind() != Kind.METHOD) continue;
+ JCMethodDecl method = (JCMethodDecl) potentialGetter.get();
+ if (!method.name.toString().equalsIgnoreCase(potentialGetterName)) continue;
+ /** static getX() methods don't count. */
+ if ((method.mods.flags & Flags.STATIC) != 0) continue;
+ /** Nor do getters with a non-empty parameter list. */
+ if (method.params != null && method.params.size() > 0) continue;
+ return new GetterMethod(method.name, method.restype);
}
}