langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ConstantPool.java
changeset 42827 36468b5fa7f4
parent 42822 a84956e7ee4d
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ConstantPool.java	Fri Dec 16 12:08:46 2016 +0100
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ConstantPool.java	Fri Dec 16 15:27:34 2016 +0000
@@ -313,36 +313,32 @@
     }
 
     public Iterable<CPInfo> entries() {
-        return new Iterable<CPInfo>() {
-            public Iterator<CPInfo> iterator() {
-                return new Iterator<CPInfo>() {
+        return () -> new Iterator<CPInfo>() {
 
-                    public boolean hasNext() {
-                        return next < pool.length;
-                    }
+            public boolean hasNext() {
+                return next < pool.length;
+            }
 
-                    public CPInfo next() {
-                        current = pool[next];
-                        switch (current.getTag()) {
-                            case CONSTANT_Double:
-                            case CONSTANT_Long:
-                                next += 2;
-                                break;
-                            default:
-                                next += 1;
-                        }
-                        return current;
-                    }
+            public CPInfo next() {
+                current = pool[next];
+                switch (current.getTag()) {
+                    case CONSTANT_Double:
+                    case CONSTANT_Long:
+                        next += 2;
+                        break;
+                    default:
+                        next += 1;
+                }
+                return current;
+            }
 
-                    public void remove() {
-                        throw new UnsupportedOperationException();
-                    }
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
 
-                    private CPInfo current;
-                    private int next = 1;
+            private CPInfo current;
+            private int next = 1;
 
-                };
-            }
         };
     }