v1.2.1 bugfix for methods in different classes with the same name
This commit is contained in:
parent
86aff15ee5
commit
7ccf137898
3 changed files with 2 additions and 3 deletions
2
pom.xml
2
pom.xml
|
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.shautvast</groupId>
|
||||
<artifactId>reflective</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<version>1.2.1</version>
|
||||
<name>reflective</name>
|
||||
<description>Reflective utils that don't use java.lang.reflect</description>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class InvokerFactory {
|
|||
*/
|
||||
public static Result<AbstractInvoker> of(MetaMethod method) {
|
||||
// new ASM ClassNode with default constructor
|
||||
String className = "Invoker" + method.getName() + method.getDescriptor().replaceAll("[()/;\\[]", "");
|
||||
String className = "Invoker" + method.getMetaClass().getJavaClass().getSimpleName() + method.getName() + method.getDescriptor().replaceAll("[()/;\\[]", "");
|
||||
if (ByteClassLoader.INSTANCE.isDefined(className)) {
|
||||
return getInvoker(className);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,6 +143,5 @@ public class ReflectiveTest {
|
|||
public void throwEx() {
|
||||
throw new RuntimeException("ex");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue