Author: michiel
Date: 2010-03-04 18:42:05 +0100 (Thu, 04 Mar 2010)
New Revision: 41270

Modified:
   
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/typehandler/AbstractTypeHandler.java
Log:
 MMB-1939  

Modified: 
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/typehandler/AbstractTypeHandler.java
===================================================================
--- 
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/typehandler/AbstractTypeHandler.java
    2010-03-04 17:40:23 UTC (rev 41269)
+++ 
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/typehandler/AbstractTypeHandler.java
    2010-03-04 17:42:05 UTC (rev 41270)
@@ -70,23 +70,24 @@
             final int max = idt.getMax() - (idt.isMaxInclusive() ? 0 : 1);
             if ((long) max - min < 200L) {
                 return new EnumHandler(tag, node, field) {
-                    int i = min;
                     @Override
                     protected Iterator<Entry<Integer, Integer>> 
getIterator(Node node, Field field) {
-                            return new Iterator<Entry<Integer, Integer>>() {
-                                    public boolean hasNext() {
-                                        return i <= max;
-                                    }
-                                    public Entry<Integer, Integer> next() {
-                                        Integer value = i++;
-                                        return new Entry<Integer, 
Integer>(value, value);
-                                    }
-                                    public void remove() {
-                                        throw new 
UnsupportedOperationException();
-                                    }
-                                };
-                        }
-                    };
+                        return new Iterator<Entry<Integer, Integer>>() {
+                            int i = min;
+
+                            public boolean hasNext() {
+                                return i <= max;
+                            }
+                            public Entry<Integer, Integer> next() {
+                                Integer value = i++;
+                                return new Entry<Integer, Integer>(value, 
value);
+                            }
+                            public void remove() {
+                                throw new UnsupportedOperationException();
+                            }
+                        };
+                    }
+                };
             }
         }
         if (dt instanceof LongDataType) {
@@ -95,23 +96,24 @@
             final long max = ldt.getMax() - (ldt.isMaxInclusive() ? 0 : 1);
             if ((double) max - min < 200.0) {
                 return new EnumHandler(tag, node, field) {
-                        long i = min;
-                        @Override
-                        protected Iterator<Entry<Long, Long>> getIterator(Node 
node, Field field) {
+                    @Override
+                    protected Iterator<Entry<Long, Long>> getIterator(Node 
node, Field field) {
                             return new Iterator<Entry<Long, Long>>() {
-                                    public boolean hasNext() {
-                                        return i <= max;
-                                    }
-                                    public Entry<Long, Long> next() {
-                                        Long value = i++;
-                                        return new Entry<Long, Long>(value, 
value);
-                                    }
-                                    public void remove() {
-                                        throw new 
UnsupportedOperationException();
-                                    }
-                                };
-                        }
-                    };
+                                long i = min;
+
+                                public boolean hasNext() {
+                                    return i <= max;
+                                }
+                                public Entry<Long, Long> next() {
+                                    Long value = i++;
+                                    return new Entry<Long, Long>(value, value);
+                                }
+                                public void remove() {
+                                    throw new UnsupportedOperationException();
+                                }
+                            };
+                    }
+                };
             }
         }
 

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to