Changeset 5024

Show
Ignore:
Timestamp:
07/03/08 12:15:59 (6 months ago)
Author:
joonas.lehtinen@…
Message:

Removed JDK 1.5 dependencies from a fix (is Form.java) that is targeted to 5.2.x

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/com/itmill/toolkit/ui/Form.java

    r5021 r5024  
    182182     * validation fails also on empty errors. 
    183183     */ 
    184     @SuppressWarnings("unchecked") 
    185     @Override 
    186184    public ErrorMessage getErrorMessage() { 
    187185        for (final Iterator i = propertyIds.iterator(); i.hasNext();) { 
    188186            try { 
    189                 AbstractComponent field = (AbstractComponent)fields.get(i.next()); 
     187                AbstractComponent field = (AbstractComponent) fields.get(i 
     188                        .next()); 
    190189                ErrorMessage e = field.getErrorMessage(); 
    191190                if (e != null) { 
    192191                    // Skip empty errors 
    193                     if (e.toString().isEmpty()) 
     192                    if ("".equals(e.toString())) { 
    194193                        continue; 
     194                    } 
    195195                    return e; 
    196196                } 
    197             } catch (ClassCastException ignored) {} 
     197            } catch (ClassCastException ignored) { 
     198            } 
    198199        } 
    199200        return null;