mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
only allow to capture object params - IDEA-188405
This commit is contained in:
@@ -157,6 +157,7 @@ public class CaptureAgent {
|
||||
return bytes;
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.out.println("Capture agent: failed to instrument " + className);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -485,6 +486,11 @@ public class CaptureAgent {
|
||||
throw new IllegalStateException(
|
||||
"Argument with id " + myIdx + " is not available, method " + methodDisplayName + " has only " + argumentTypes.length);
|
||||
}
|
||||
int sort = argumentTypes[myIdx].getSort();
|
||||
if (sort != Type.OBJECT && sort != Type.ARRAY) {
|
||||
throw new IllegalStateException(
|
||||
"Argument with id " + myIdx + " in method " + methodDisplayName + " must be an object");
|
||||
}
|
||||
for (int i = 0; i < myIdx; i++) {
|
||||
index += argumentTypes[i].getSize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user