jdk/src/share/classes/javax/swing/text/NumberFormatter.java
changeset 1299 027d966d5658
parent 715 f16baef3a20e
parent 1287 a04aca99c77a
child 5506 202f599c92aa
--- a/jdk/src/share/classes/javax/swing/text/NumberFormatter.java	Thu Aug 07 09:42:31 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/NumberFormatter.java	Tue Aug 12 17:59:58 2008 -0700
@@ -299,10 +299,7 @@
             if (attrs.get(NumberFormat.Field.SIGN) != null) {
                 size--;
             }
-            if (size == 0) {
-                return true;
-            }
-            return false;
+            return size == 0;
         }
         return true;
     }
@@ -315,10 +312,7 @@
     boolean isNavigatable(int index) {
         if (!super.isNavigatable(index)) {
             // Don't skip the decimal, it causes wierd behavior
-            if (getBufferedChar(index) == getDecimalSeparator()) {
-                return true;
-            }
-            return false;
+            return getBufferedChar(index) == getDecimalSeparator();
         }
         return true;
     }
@@ -341,11 +335,7 @@
                 Map attrs = iterator.getAttributes();
 
                 if (attrs != null && attrs.size() > 0) {
-                    Iterator keys = attrs.keySet().iterator();
-
-                    while (keys.hasNext()) {
-                        Object key = keys.next();
-
+                    for (Object key : attrs.keySet()) {
                         if (key instanceof NumberFormat.Field) {
                             return (NumberFormat.Field)key;
                         }
@@ -461,7 +451,7 @@
                     }
                 }
                 if (string != null) {
-                    Class valueClass = getValueClass();
+                    Class<?> valueClass = getValueClass();
 
                     if (valueClass == null) {
                         valueClass = value.getClass();