diff options
author | Artur Signell <artur@vaadin.com> | 2011-12-21 09:10:17 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2011-12-21 09:10:56 +0200 |
commit | 7e594fb40fd2a9ad1759d422a62a5c4045351e6d (patch) | |
tree | ebe018f799472e6e533fe46257b0de7967128c00 /src/com/vaadin/ui/AbstractField.java | |
parent | fbfab86bcdde3fbae4df02212e2d100163a30316 (diff) | |
download | vaadin-framework-7e594fb40fd2a9ad1759d422a62a5c4045351e6d.tar.gz vaadin-framework-7e594fb40fd2a9ad1759d422a62a5c4045351e6d.zip |
#8125 Removed Property.ConversionException and String constructor based
conversion from Property classes
Diffstat (limited to 'src/com/vaadin/ui/AbstractField.java')
-rw-r--r-- | src/com/vaadin/ui/AbstractField.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java index daef4c0ddb..182aff05b5 100644 --- a/src/com/vaadin/ui/AbstractField.java +++ b/src/com/vaadin/ui/AbstractField.java @@ -557,11 +557,11 @@ public abstract class AbstractField<T> extends AbstractComponent implements * @throws Property.ConversionException */ public void setValue(Object newFieldValue) - throws Property.ReadOnlyException, Property.ConversionException { + throws Property.ReadOnlyException, Converter.ConversionException { // This check is needed as long as setValue accepts Object instead of T if (newFieldValue != null) { if (!getType().isAssignableFrom(newFieldValue.getClass())) { - throw new ConversionException("Value of type " + throw new Converter.ConversionException("Value of type " + newFieldValue.getClass() + " cannot be assigned to " + getClass().getName()); } @@ -577,10 +577,9 @@ public abstract class AbstractField<T> extends AbstractComponent implements * @param repaintIsNotNeeded * True iff caller is sure that repaint is not needed. * @throws Property.ReadOnlyException - * @throws Property.ConversionException */ protected void setValue(T newFieldValue, boolean repaintIsNotNeeded) - throws Property.ReadOnlyException, Property.ConversionException, + throws Property.ReadOnlyException, Converter.ConversionException, InvalidValueException { if (!equals(newFieldValue, getInternalValue())) { @@ -826,7 +825,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements if (getType().isAssignableFrom(newValue.getClass())) { return (T) newValue; } else { - throw new ConversionException( + throw new Converter.ConversionException( "Unable to convert value of type " + newValue.getClass().getName() + " to " @@ -857,7 +856,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements return valueConverter.convertFromTargetToSource(fieldValue, getLocale()); } catch (com.vaadin.data.util.converter.Converter.ConversionException e) { - throw new ConversionException( + throw new Converter.ConversionException( getValueConversionError(valueConverter.getSourceType())); } } |