byte-buddy icon indicating copy to clipboard operation
byte-buddy copied to clipboard

Advice$Dispatcher$Inlining does not show adviceMethod in String representation

Open noam-bionicstork opened this issue 2 years ago • 1 comments

During development I got the exception raised in Advice.java line 478: throw new IllegalStateException("Duplicate advice for " + dispatcher + " and " + methodDescription);

But the message I got in the exception was: Duplicate advice for net.bytebuddy.asm.Advice$Dispatcher$Inlining and <name of duplication function...> So I was able to tell what is the function I was trying to add as Advice but not the function that is already registered, and I ran it with a debugger with a breakpoint on that throw to retrieve the duplicated advice.

It would be much easier if the string representation of this class contained the encompassed method

Thanks! Noam @ Bionic

noam-bionicstork avatar Jun 14 '23 09:06 noam-bionicstork

Good point. I added that.

raphw avatar Jun 19 '23 21:06 raphw