From af82e142c37e08bbda7e3869072460c92f1fb575 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 30 Jan 2013 13:17:48 +0200 Subject: Do not throw NPE when asking for a null propertyId (#10445) Change-Id: If788d84c66d640368989e443394505600ad12439 --- server/tests/src/com/vaadin/data/util/TestIndexedContainer.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/tests') diff --git a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java b/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java index 971cdb5f62..09e5a26c15 100644 --- a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java +++ b/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java @@ -384,4 +384,12 @@ public class TestIndexedContainer extends AbstractInMemoryContainerTest { assertNull(ic.getContainerProperty(object1, "xyz")); } + // test getting null property id (#10445) + public void testNullPropertyId() { + IndexedContainer ic = new IndexedContainer(); + String object1 = new String("Obj1"); + ic.addItem(object1); + assertNull(ic.getContainerProperty(object1, null)); + } + } -- cgit v1.2.3