Updated Branches: refs/heads/master 0ec6c8ebe -> 11c2d1fbb
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/11c2d1fb Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/11c2d1fb Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/11c2d1fb Branch: refs/heads/master Commit: 11c2d1fbb0b43e9df08016d9e04c68359df310cb Parents: 0ec6c8e Author: svenmeier <[email protected]> Authored: Thu Jul 18 13:49:34 2013 +0200 Committer: svenmeier <[email protected]> Committed: Thu Jul 18 13:49:34 2013 +0200 ---------------------------------------------------------------------- .../wicket/markup/html/form/FormComponent.java | 6 ++++-- .../org/apache/wicket/util/convert/IConverter.java | 16 +++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/11c2d1fb/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 50821ea..236f9d2 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() { http://git-wip-us.apache.org/repos/asf/wicket/blob/11c2d1fb/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..314294c 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,13 +34,13 @@ 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.
