Fix parameter indexing for longs and doubles
This commit is contained in:
+4
-3
@@ -389,7 +389,7 @@ public class InterceptionInstrumenter {
|
|||||||
Type[] parameterTypes = Type.getArgumentTypes(instrumentedMethodDesc);
|
Type[] parameterTypes = Type.getArgumentTypes(instrumentedMethodDesc);
|
||||||
boolean isStatic = (access & ACC_STATIC) != 0;
|
boolean isStatic = (access & ACC_STATIC) != 0;
|
||||||
int base = isStatic ? 0 : 1;
|
int base = isStatic ? 0 : 1;
|
||||||
int parametersUsed = 0;
|
int parameterOffset = 0;
|
||||||
for (int i = 0; i < parameterCount; i++) {
|
for (int i = 0; i < parameterCount; i++) {
|
||||||
if (i == methodData.getThisParameterIndex()) {
|
if (i == methodData.getThisParameterIndex()) {
|
||||||
if (isStatic) {
|
if (isStatic) {
|
||||||
@@ -408,8 +408,9 @@ public class InterceptionInstrumenter {
|
|||||||
ia.aconst(instrumentedMethodDesc);
|
ia.aconst(instrumentedMethodDesc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ia.load(base + parametersUsed, parameterTypes[parametersUsed]);
|
Type type = parameterTypes[parameterOffset];
|
||||||
parametersUsed++;
|
ia.load(base + parameterOffset, type);
|
||||||
|
parameterOffset += type.getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user