Author: mgrigorov
Date: Wed Nov  2 13:26:25 2011
New Revision: 1196567

URL: http://svn.apache.org/viewvc?rev=1196567&view=rev
Log:
Use Args.notNull() and improve a bit the javadoc.

No functional changes!


Modified:
    
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java?rev=1196567&r1=1196566&r2=1196567&view=diff
==============================================================================
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java
 Wed Nov  2 13:26:25 2011
@@ -19,10 +19,12 @@ package org.apache.wicket.markup.html.fo
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.parser.XmlTag.TagType;
+import org.apache.wicket.util.lang.Args;
 
 /**
- * A component that represents html <label> tag. This component will 
automatically make the
- * form component output an id attribute and link its for attribute with that 
value.
+ * A component that represents HTML <label> tag. This component will 
automatically make the
+ * form component output an <em>id</em> attribute and link its <em>for</em> 
attribute with that
+ * value.
  * 
  * @author Igor Vaynberg (ivaynberg)
  */
@@ -43,11 +45,8 @@ public class FormComponentLabel extends 
        public FormComponentLabel(String id, LabeledWebMarkupContainer 
component)
        {
                super(id);
-               if (component == null)
-               {
-                       throw new IllegalArgumentException("Component argument 
cannot be null");
-               }
-               this.component = component;
+
+               this.component = Args.notNull(component, "component");
                component.setOutputMarkupId(true);
        }
 


Reply via email to