diff options
author | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2008-07-03 12:15:59 +0000 |
---|---|---|
committer | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2008-07-03 12:15:59 +0000 |
commit | 8b1e80f5585c524c2570107ebfe42890174cfb0f (patch) | |
tree | 2ec9d2ed36feb35c69b29e0294758d70acf52e5d | |
parent | 4bafd9ae676075f94870e6f8295ae0fc2715b9ef (diff) | |
download | vaadin-framework-8b1e80f5585c524c2570107ebfe42890174cfb0f.tar.gz vaadin-framework-8b1e80f5585c524c2570107ebfe42890174cfb0f.zip |
Removed JDK 1.5 dependencies from a fix (is Form.java) that is targeted to 5.2.x
svn changeset:5024/svn branch:trunk
-rw-r--r-- | src/com/itmill/toolkit/ui/Form.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/itmill/toolkit/ui/Form.java b/src/com/itmill/toolkit/ui/Form.java index 0140f0dffb..5f0863ff51 100644 --- a/src/com/itmill/toolkit/ui/Form.java +++ b/src/com/itmill/toolkit/ui/Form.java @@ -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; } |