bbossgroups/pinpoint-plugin-generate

How do you configure a class with two methods with the same name

Closed this issue · 5 comments

How do I configure a class with two methods with the same name.This is how I configured it
plugin.interceptor.classes=org.apache.kafka.clients.producer.KafkaProducer|send
but,something unusual happened.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.frameworkset.runtime.CommonLauncher.startup(CommonLauncher.java:391)
at org.frameworkset.runtime.CommonLauncher.run(CommonLauncher.java:230)
at org.frameworkset.runtime.CommonLauncher.main(CommonLauncher.java:556)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.frameworkset.pinpoint.plugin.generator.Main.buildInterceptorClassInfos(Main.java:90)
at org.frameworkset.pinpoint.plugin.generator.Main.buildGenConfig(Main.java:73)
at org.frameworkset.pinpoint.plugin.generator.Main.main(Main.java:32)
... 7 more
Can you help me? Thank you very much!

This is fixed.
Same named methods only to config one name

hi @yin-bp So when you have two methods with the same name "send", can I configure it this way?
plugin.interceptor.classes = org.apache.kafka.clients.producer.KafkaProducer | send
But this configuration has the exception mentioned above, so can you point it out? Thank you very much!

The exception mentioned above is a bug of this tool,I have fixed it yesterday,You can get the lasted released version from github or get source code to compile and releasedVersion yourself.

hi @yin-bp I really want to know why, thank you very much!

Look this commit:
380caae

Removed the logger operations that cause this bug.