Skip to content

Commit

Permalink
correctly look only at getters
Browse files Browse the repository at this point in the history
  • Loading branch information
Oblarg committed Jun 3, 2019
1 parent 711bf5c commit 1cfec8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/main/java/io/github/oblarg/oblog/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,9 @@ private static void logFieldsAndMethods(Object loggable,
for (Method method : methods) {

// Only look at getters
if (method.getReturnType().equals(Void.TYPE) || registeredMethods.contains(method)) {
if (method.getReturnType().equals(Void.TYPE) ||
method.getParameterTypes().length > 0 ||
registeredMethods.contains(method)) {
continue;
}

Expand Down

0 comments on commit 1cfec8f

Please sign in to comment.