mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
Java: avoid unnecessary regex compilation and matching
GitOrigin-RevId: c58621b89c1594d24e7ea23d6dab6f86d7a80112
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c0aed296b7
commit
3eace12483
@@ -144,12 +144,7 @@ public class PsiDocMethodOrFieldRef extends CompositePsiElement implements PsiDo
|
||||
List<String> types = new ArrayList<>();
|
||||
for (PsiElement child = element.getFirstChild(); child != null; child = child.getNextSibling()) {
|
||||
if (child.getNode().getElementType() == DOC_TYPE_HOLDER) {
|
||||
final String[] typeStrings = child.getText().split("[, ]"); //avoid param types list parsing hmm method(paramType1, paramType2, ...) -> typeElement1, identifier2, ...
|
||||
for (String type : typeStrings) {
|
||||
if (!type.isEmpty()) {
|
||||
types.add(type);
|
||||
}
|
||||
}
|
||||
types.add(child.getText());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user