From 9e1732482bc62587e9db723fa25df06d8110f112 Mon Sep 17 00:00:00 2001 From: John Alhroos Date: Wed, 27 Apr 2011 11:30:16 +0000 Subject: [PATCH] Simplified if-else conditional for actions #5992 svn changeset:18494/svn branch:6.6 --- src/com/vaadin/ui/Table.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index f0416a2059..b14df2cdaa 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -2151,18 +2151,12 @@ public class Table extends AbstractSelect implements Action.Container, if (st.countTokens() == 2) { final Object itemId = itemIdMapper.get(st.nextToken()); final Action action = (Action) actionMapper.get(st.nextToken()); - if (action != null && containsId(itemId) + + if (action != null && (itemId == null || containsId(itemId)) && actionHandlers != null) { - // Item action for (Handler ah : actionHandlers) { ah.handleAction(action, this, itemId); } - } else if (action != null && actionHandlers != null - && itemId == null) { - // Body action - for (Handler ah : actionHandlers) { - ah.handleAction(action, this, null); - } } } } -- 2.39.5