You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2014/05/27 15:08:03 UTC

[2/4] git commit: WICKET-5601 AbstractSingleSelectChoice fails with NullPointerException when its choice renderer returns null from #getIdValue()

WICKET-5601 AbstractSingleSelectChoice fails with NullPointerException when its choice renderer returns null from #getIdValue()


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f11a75c7
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f11a75c7
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f11a75c7

Branch: refs/heads/wicket-6.x
Commit: f11a75c7a5bd86c424ed29d66847aaf0d25553c1
Parents: 03c2210
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue May 27 15:06:27 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue May 27 15:06:27 2014 +0200

----------------------------------------------------------------------
 .../wicket/markup/html/form/AbstractSingleSelectChoice.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/f11a75c7/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
index d05da71..55d4f11c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
@@ -275,7 +275,8 @@ public abstract class AbstractSingleSelectChoice<T> extends AbstractChoice<T, T>
 		{
 			// Get next choice
 			final T choice = choices.get(index);
-			if (renderer.getIdValue(choice, index).equals(id))
+			String idValue = renderer.getIdValue(choice, index);
+			if (idValue != null && idValue.equals(id))
 			{
 				return choice;
 			}