Change-Id: I9829173dda84d5f496114b7d08204648bf86fc77
*/
@Override
public Property getContainerProperty(Object itemId, Object propertyId) {
- if (!containsId(itemId)) {
+ // map lookup more efficient than propertyIds if there are many
+ // properties
+ if (!containsId(itemId) || !types.containsKey(propertyId)) {
return null;
}
}
}
+ // test getting non-existing property (#10445)
+ public void testNonExistingProperty() {
+ IndexedContainer ic = new IndexedContainer();
+ String object1 = new String("Obj1");
+ ic.addItem(object1);
+ assertNull(ic.getContainerProperty(object1, "xyz"));
+ }
+
}