summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data/util
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2012-11-30 14:49:04 +0200
committerHenri Sara <hesara@vaadin.com>2012-11-30 14:49:04 +0200
commit84099ee2b8363c12a813157f9752981add5db113 (patch)
tree7ef93b6e3bca805d5c19cb31a24edda74c02b731 /server/src/com/vaadin/data/util
parentfaf6b3861d26571ffefd3dc60c2ff7d5685576d0 (diff)
downloadvaadin-framework-84099ee2b8363c12a813157f9752981add5db113.tar.gz
vaadin-framework-84099ee2b8363c12a813157f9752981add5db113.zip
Return null as non-existing property for IndexedContainer (#10445)
Change-Id: I9829173dda84d5f496114b7d08204648bf86fc77
Diffstat (limited to 'server/src/com/vaadin/data/util')
-rw-r--r--server/src/com/vaadin/data/util/IndexedContainer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/com/vaadin/data/util/IndexedContainer.java b/server/src/com/vaadin/data/util/IndexedContainer.java
index 81ee4ae2a0..aeb0ca96eb 100644
--- a/server/src/com/vaadin/data/util/IndexedContainer.java
+++ b/server/src/com/vaadin/data/util/IndexedContainer.java
@@ -164,7 +164,9 @@ public class IndexedContainer extends
*/
@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;
}