Skip to content

Commit

Permalink
Fixed CLSM not finding methods with no parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
cijaaimee committed Dec 14, 2019
1 parent 240a717 commit 91c20e9
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@ public static void premain(String agentArgs, Instrumentation instrumentation) {
}

String methodName = matcher.group(1);
String[] parameters = matcher.group(2).split(",");
String paramsString = matcher.group(2).trim();
String[] parameters;

if (paramsString.isEmpty()) {
parameters = new String[0];
} else {
parameters = matcher.group(2).split(",");
}

String location = matcher.group(3);
String content;

Expand Down

0 comments on commit 91c20e9

Please sign in to comment.