修复部分问题

This commit is contained in:
ascrutae 2016-12-14 17:44:15 +08:00
parent 6af1a0fc19
commit 963b07b800
3 changed files with 9 additions and 3 deletions

View File

@ -18,6 +18,10 @@ public class ArgumentTypeNameMatch implements ElementMatcher<MethodDescription>
@Override
public boolean matches(MethodDescription target) {
return target.getParameters().get(index).getType().asErasure().getName().equals(argumentTypeName);
if (target.getParameters().size() > index) {
return target.getParameters().get(index).getType().asErasure().getName().equals(argumentTypeName);
}
return false;
}
}

View File

@ -23,7 +23,7 @@
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.8.1</version>
<version>2.9.0</version>
<scope>provided</scope>
</dependency>

View File

@ -11,6 +11,8 @@ import com.a.eye.skywalking.plugin.interceptor.matcher.SimpleMethodMatcher;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
import java.net.URI;
import static net.bytebuddy.matcher.ElementMatchers.not;
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
@ -46,7 +48,7 @@ public class JedisPluginDefine extends ClassInstanceMethodsEnhancePluginDefine {
}, new ConstructorInterceptPoint() {
@Override
public ElementMatcher<MethodDescription> getConstructorMatcher() {
return takesArgument(0, String.class);
return takesArgument(0, URI.class);
}
@Override