mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Optimize find property
This commit is contained in:
@@ -524,16 +524,12 @@ public abstract class PropertyTable extends JBTable {
|
||||
}
|
||||
|
||||
public static int findProperty(List<Property> properties, Property property) {
|
||||
int index = properties.indexOf(property);
|
||||
if (index != -1) {
|
||||
return index;
|
||||
}
|
||||
|
||||
String name = property.getName();
|
||||
int size = properties.size();
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (name.equals(properties.get(i).getName())) {
|
||||
Property nextProperty = properties.get(i);
|
||||
if (Comparing.equal(nextProperty.getGroup(), property.getGroup()) && name.equals(nextProperty.getName())) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user