From e7d67c65345527faf98917d06df716ef9431ed2d Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Thu, 15 Nov 2012 16:25:38 +0400 Subject: [PATCH] Optimize find property --- .../intellij/designer/propertyTable/PropertyTable.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java b/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java index 4f171d88064b..6b6cadbb0170 100644 --- a/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java +++ b/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java @@ -524,16 +524,12 @@ public abstract class PropertyTable extends JBTable { } public static int findProperty(List 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; } }