mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
don't multiply dfa states up to infinity when comparing ints (NameUtil.MinusculeMatcher.matchAfterFragment too complex to analyze)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import java.util.List;
|
||||
|
||||
public class Foo {
|
||||
public void matchAfterFragment(int patternIndex, int matchLen) {
|
||||
int star = patternIndex < matchLen ? matchLen : -1;
|
||||
while (matchLen > 0) {
|
||||
int i = matchLen == star ? matchLen : star;
|
||||
}
|
||||
}
|
||||
|
||||
public void matchAfterFragmentBoxed(Integer patternIndex, Integer matchLen) {
|
||||
Integer star = patternIndex < matchLen ? matchLen : -1;
|
||||
while (matchLen > 0) {
|
||||
Integer i = matchLen == star ? matchLen : star;
|
||||
}
|
||||
}
|
||||
|
||||
public void matchAfterFragmentSemiBoxed(Integer patternIndex, Integer matchLen) {
|
||||
int star = patternIndex < matchLen ? matchLen : -1;
|
||||
while (matchLen > 0) {
|
||||
Integer i = matchLen == star ? matchLen : star;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user