Skip to content

Commit

Permalink
Adjustment to avoid incorrect warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Kaipe committed May 13, 2024
1 parent 929ee57 commit 3514606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/lazyparams/internal/AdviceFor.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ protected ElementMatcher.Junction<? super TypeDescription> definitionsToInstrume
/* Special case that implies this method must be overridden: */
try {
StackTraceElement[] trace = Thread.currentThread().getStackTrace();
assert trace[0].getMethodName().equals(trace[1].getMethodName());
assert trace[0].getMethodName().equals(trace[1].getMethodName())
|| trace[1].getMethodName().equals(trace[2].getMethodName());
} catch (RuntimeException ignoreCheck) {
} catch (AssertionError badState) {
System.err.println(getClass() + " has java.lang.Object as "
Expand Down

0 comments on commit 3514606

Please sign in to comment.