Project

General

Profile

Revision 4b91c104

ID4b91c1043a146054a9fc440b13fb071bdcd0d2a2
Parent 0824e7df
Child 6a24c1a8

Added by Andreas Kohlbecker almost 4 years ago

stripping whitespace before URI conversion

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/util/converter/UriConverter.java
47 47
    public URI convertToModel(String value, Class<? extends URI> targetType, Locale locale)
48 48
            throws com.vaadin.data.util.converter.Converter.ConversionException {
49 49
        if(value != null){
50
            try{
51
                URI uri = new URI(value);
52
                return uri;
53
            } catch (Exception e){
54
                throw new com.vaadin.data.util.converter.Converter.ConversionException(e);
50
            value = value.trim();
51
            if(!value.isEmpty()){
52
                try{
53
                    URI uri = new URI(value.trim());
54
                    return uri;
55
                } catch (Exception e){
56
                    throw new com.vaadin.data.util.converter.Converter.ConversionException(e);
57
                }
55 58
            }
56 59
        }
57 60
        return null;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)