You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ja...@apache.org on 2007/06/26 08:52:21 UTC

svn commit: r550715 - /incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java

Author: janne
Date: Mon Jun 25 23:52:20 2007
New Revision: 550715

URL: http://svn.apache.org/viewvc?view=rev&rev=550715
Log:
fixed (WICKET-697) FormTester crashes with NullPointerException, if FormComponent is not found


Modified:
    incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java?view=diff&rev=550715&r1=550714&r2=550715
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java Mon Jun 25 23:52:20 2007
@@ -274,6 +274,11 @@
 		 */
 		protected ChoiceSelector create(FormComponent formComponent)
 		{
+			if (formComponent == null)
+			{
+				fail("Trying to select on null component.");
+			}
+
 			if (formComponent instanceof RadioGroup || formComponent instanceof DropDownChoice
 					|| formComponent instanceof RadioChoice)
 			{