Updated Branches:
  refs/heads/wicket-6.x 7cdc88f8c -> f270102ff

WICKET-5276 added ConversionException to method signature

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

Branch: refs/heads/wicket-6.x
Commit: f270102ff8f71bd43a3bfe6ede3f29dfb5de3437
Parents: 7cdc88f
Author: svenmeier <[email protected]>
Authored: Thu Jul 18 13:49:03 2013 +0200
Committer: svenmeier <[email protected]>
Committed: Thu Jul 18 13:49:03 2013 +0200

----------------------------------------------------------------------
 .../wicket/markup/html/form/FormComponent.java    | 10 +++++++---
 .../apache/wicket/util/convert/IConverter.java    | 18 ++++++++++--------
 2 files changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/f270102f/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
index 8c836e1..c124b26 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
@@ -1151,8 +1151,8 @@ public abstract class FormComponent<T> extends 
LabeledWebMarkupContainer
 
        /**
         * Converts and validates the conversion of the raw input string into 
the object specified by
-        * {@link FormComponent#getType()} and records any errors. Converted 
value is available through
-        * {@link FormComponent#getConvertedInput()}.
+        * {@link FormComponent#getType()} and records any thrown {@link 
ConversionException}s.
+        * Converted value is available through {@link 
FormComponent#getConvertedInput()}.
         * 
         * <p>
         * Usually the user should do custom conversions by specifying an 
{@link IConverter} by
@@ -1162,6 +1162,8 @@ public abstract class FormComponent<T> extends 
LabeledWebMarkupContainer
         * 
         * @see IConverterLocator
         * @see Application#newConverterLocator()
+        * @see IConverter#convertToObject(String, Locale)
+        * @see #newValidationError(ConversionException)
         */
        protected void convertInput()
        {
@@ -1605,7 +1607,9 @@ public abstract class FormComponent<T> extends 
LabeledWebMarkupContainer
                        {
                                // ignore this exception because it could be 
that there
                                // is not setter for this collection.
-                               logger.info("An error occurred while trying to 
set the new value for the property attached to " + formComponent, e);
+                               logger.info(
+                                       "An error occurred while trying to set 
the new value for the property attached to " +
+                                               formComponent, e);
                        }
                }
        }

http://git-wip-us.apache.org/repos/asf/wicket/blob/f270102f/wicket-util/src/main/java/org/apache/wicket/util/convert/IConverter.java
----------------------------------------------------------------------
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/convert/IConverter.java 
b/wicket-util/src/main/java/org/apache/wicket/util/convert/IConverter.java
index 82cbbee..9448839 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/convert/IConverter.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/convert/IConverter.java
@@ -34,14 +34,14 @@ import org.apache.wicket.util.io.IClusterable;
  * translated to a corresponding {@link Date} object.
  * 
  * Notice that incoming value, when used by a FormComponent, will never be 
null because before
- * validation form components perform the required (see 
FormComponent.isRequired()) check
- * which errors out on null values. In the case the FormComponent is not 
required and the user
- * enters a null value converters will not be invoked because no type 
conversion is necessary.
+ * validation form components perform the required (see 
FormComponent.isRequired()) check which
+ * errors out on null values. In the case the FormComponent is not required 
and the user enters a
+ * null value converters will not be invoked because no type conversion is 
necessary.
  * </p>
- *
- * See org.apache.wicket.Component#getConverter(Class)
- * See org.apache.wicket.Application#getConverterLocator()
- *
+ * 
+ * @see org.apache.wicket.Component#getConverter(Class)
+ * @see org.apache.wicket.Application#getConverterLocator()
+ * 
  * @author Eelco Hillenius
  * @author Jonathan Locke
  * 
@@ -58,8 +58,10 @@ public interface IConverter<C> extends IClusterable
         * @param locale
         *            The locale used to convert the value
         * @return The converted value
+        * @throws ConversionException
+        *             if value could not be converted
         */
-       C convertToObject(String value, Locale locale);
+       C convertToObject(String value, Locale locale) throws 
ConversionException;
 
        /**
         * Converts the given value to a string.

Reply via email to