Avoid creating a new String to qualify types
- This is now slightly faster, which for a method that gets called over 1 million times on large projects is significant. - We should still look for ways to reduce the number of calls to this method.
This commit is contained in:

committed by
Andreas Dangel

parent
4d8dcf3443
commit
28e2f11003
@ -341,7 +341,7 @@ public class ClassScope extends AbstractJavaScope {
|
||||
for (String qualified : qualifiedNames) {
|
||||
int fullLength = qualified.length();
|
||||
if (qualified.endsWith(typeImage)
|
||||
&& (fullLength == nameLength || qualified.substring(0, fullLength - nameLength).endsWith("."))) {
|
||||
&& (fullLength == nameLength || qualified.charAt(fullLength - nameLength - 1) == '.')) {
|
||||
return qualified;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user