]> source.dussan.org Git - vaadin-framework.git/commitdiff
Removed JDK 1.5 dependencies from a fix (is Form.java) that is targeted to 5.2.x
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Thu, 3 Jul 2008 12:15:59 +0000 (12:15 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Thu, 3 Jul 2008 12:15:59 +0000 (12:15 +0000)
svn changeset:5024/svn branch:trunk

src/com/itmill/toolkit/ui/Form.java

index 0140f0dffb8a6dc3af6bcd89bb763022ca4f1ff5..5f0863ff515f92ec13a5dc99060158e9412f2723 100644 (file)
@@ -181,20 +181,21 @@ public class Form extends AbstractField implements Item.Editor, Buffered, Item,
      * the calculation of the error message is separate from validation, because
      * validation fails also on empty errors.
      */
-    @SuppressWarnings("unchecked")
-    @Override
     public ErrorMessage getErrorMessage() {
         for (final Iterator i = propertyIds.iterator(); i.hasNext();) {
             try {
-                AbstractComponent field = (AbstractComponent)fields.get(i.next());
+                AbstractComponent field = (AbstractComponent) fields.get(i
+                        .next());
                 ErrorMessage e = field.getErrorMessage();
                 if (e != null) {
                     // Skip empty errors
-                    if (e.toString().isEmpty())
+                    if ("".equals(e.toString())) {
                         continue;
+                    }
                     return e;
                 }
-            } catch (ClassCastException ignored) {}
+            } catch (ClassCastException ignored) {
+            }
         }
         return null;
     }