Skip to content

Commit 444f285

Browse files
committed
Add suggestion from Bruce
1 parent e095d9c commit 444f285

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/bytebuddy/matcher/ProxyClassIgnores.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,16 @@ public class ProxyClassIgnores {
55
private ProxyClassIgnores() {}
66

77
public static boolean isIgnored(String name) {
8-
int last = -1;
9-
int idx;
10-
while (true) {
11-
idx = name.indexOf('$', last + 1);
12-
if (idx < 0) {
13-
break;
14-
}
8+
for (int last = -1, idx; (idx = name.indexOf('$', last + 1)) >= 0; last = idx) {
159
if (last < 0 && name.contains("CGLIB$$")) {
1610
// check this once
1711
return true;
1812
}
1913
if (idx == last + 1) {
2014
// skip the trie if consecutive $$ since, to be efficient, we can match prefixes from the
2115
// first dollar
22-
last = idx;
2316
continue;
2417
}
25-
last = idx;
2618
if (ProxyIgnoredClassNameTrie.apply(name, idx) == 1) {
2719
return true;
2820
}

0 commit comments

Comments
 (0)