changeset 11738:7f272eeff5ab

Merge
author prr
date Mon, 06 Apr 2015 10:35:59 -0700
parents 2c5f536a678a 27776337ac9e
children cad454f317b0 28ef4bffb994
files test/jdk/lambda/FDTest.java test/jdk/lambda/LambdaTranslationInInterface.java test/jdk/lambda/LambdaTranslationInnerConstructor.java test/jdk/lambda/MethodReferenceTestFDCCE.java test/jdk/lambda/MethodReferenceTestInnerDefault.java test/jdk/lambda/MethodReferenceTestInnerInstance.java test/jdk/lambda/MethodReferenceTestInnerVarArgsThis.java test/jdk/lambda/MethodReferenceTestInstance.java test/jdk/lambda/MethodReferenceTestKinds.java test/jdk/lambda/MethodReferenceTestNew.java test/jdk/lambda/MethodReferenceTestNewInner.java test/jdk/lambda/MethodReferenceTestSueCase1.java test/jdk/lambda/MethodReferenceTestSueCase2.java test/jdk/lambda/MethodReferenceTestSueCase4.java test/jdk/lambda/MethodReferenceTestSuper.java test/jdk/lambda/MethodReferenceTestSuperDefault.java test/jdk/lambda/MethodReferenceTestTypeConversion.java test/jdk/lambda/MethodReferenceTestVarArgs.java test/jdk/lambda/MethodReferenceTestVarArgsExt.java test/jdk/lambda/MethodReferenceTestVarArgsSuper.java test/jdk/lambda/MethodReferenceTestVarArgsSuperDefault.java test/jdk/lambda/MethodReferenceTestVarArgsThis.java test/jdk/lambda/shapegen/ClassCase.java test/jdk/lambda/shapegen/Hierarchy.java test/jdk/lambda/shapegen/HierarchyGenerator.java test/jdk/lambda/shapegen/Rule.java test/jdk/lambda/shapegen/RuleGroup.java test/jdk/lambda/shapegen/TTNode.java test/jdk/lambda/shapegen/TTParser.java test/jdk/lambda/shapegen/TTShape.java
diffstat 56 files changed, 952 insertions(+), 4102 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Apr 06 19:09:18 2015 +0400
+++ b/.hgtags	Mon Apr 06 10:35:59 2015 -0700
@@ -298,3 +298,5 @@
 6cb5f5c34009630749a40cefe116d143f0b2583e jdk9-b53
 568a62ab7d764d7c74ac1d87387dbe500662b551 jdk9-b54
 d49e247dade61f29f771f09b2105857492241156 jdk9-b55
+7969f7b6465e47ce4afa77670ca600b04c1d746c jdk9-b56
+c76339e86ea7da5d9ac7856f3fae9ef73eef04a2 jdk9-b57
--- a/make/lib/CoreLibraries.gmk	Mon Apr 06 19:09:18 2015 +0400
+++ b/make/lib/CoreLibraries.gmk	Mon Apr 06 10:35:59 2015 -0700
@@ -269,7 +269,7 @@
 LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO))
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-  LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c
+  LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c
 
   BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
   BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
@@ -317,12 +317,7 @@
     LANG := C, \
     OPTIMIZATION := HIGH, \
     CFLAGS := $(LIBJLI_CFLAGS), \
-    DISABLED_WARNINGS_gcc := pointer-to-int-cast sign-compare format-nonliteral \
-        parentheses, \
-    DISABLED_WARNINGS_clang := implicit-function-declaration parentheses \
-        int-conversion, \
-    DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION E_NEWLINE_NOT_LAST, \
-    DISABLED_WARNINGS_microsoft := 4244 4047 4267, \
+    DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -371,7 +366,6 @@
       LANG := C, \
       OPTIMIZATION := HIGH, \
       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
-      DISABLED_WARNINGS_microsoft := 4244 4047 4267, \
       ARFLAGS := $(ARFLAGS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
@@ -392,8 +386,6 @@
       LANG := C, \
       OPTIMIZATION := HIGH, \
       CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
-      DISABLED_WARNINGS_clang := implicit-function-declaration parentheses \
-          int-conversion, \
       LDFLAGS := -nostdlib -r, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
--- a/src/java.base/macosx/native/libjli/java_md_macosx.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/macosx/native/libjli/java_md_macosx.c	Mon Apr 06 10:35:59 2015 -0700
@@ -852,7 +852,7 @@
     if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
       void * tmp;
       pthread_join(tid, &tmp);
-      rslt = (int)tmp;
+      rslt = (int)(intptr_t)tmp;
     } else {
      /*
       * Continue execution in current thread if for some reason (e.g. out of
--- a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -478,7 +478,6 @@
         if (prolepticYear < getMinimumYear() || prolepticYear > getMaximumYear()) {
             return false;
         }
-        int epochMonth = yearToEpochMonth((int) prolepticYear);
         int len = getYearLength((int) prolepticYear);
         return (len > 354);
     }
@@ -659,7 +658,7 @@
     }
 
     /**
-     * Return the maximum supported Hijrah ear.
+     * Return the maximum supported Hijrah year.
      *
      * @return the minimum
      */
--- a/src/java.base/share/classes/java/util/HashMap.java	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/classes/java/util/HashMap.java	Mon Apr 06 10:35:59 2015 -0700
@@ -1082,6 +1082,16 @@
         return null;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link ConcurrentModificationException} if it is detected that the
+     * mapping function modifies this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * mapping function modified this map
+     */
     @Override
     public V computeIfAbsent(K key,
                              Function<? super K, ? extends V> mappingFunction) {
@@ -1115,7 +1125,9 @@
                 return oldValue;
             }
         }
+        int mc = modCount;
         V v = mappingFunction.apply(key);
+        if (mc != modCount) { throw new ConcurrentModificationException(); }
         if (v == null) {
             return null;
         } else if (old != null) {
@@ -1130,12 +1142,23 @@
             if (binCount >= TREEIFY_THRESHOLD - 1)
                 treeifyBin(tab, hash);
         }
-        ++modCount;
+        modCount = mc + 1;
         ++size;
         afterNodeInsertion(true);
         return v;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link ConcurrentModificationException} if it is detected that the
+     * remapping function modifies this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * remapping function modified this map
+     */
+    @Override
     public V computeIfPresent(K key,
                               BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
         if (remappingFunction == null)
@@ -1144,7 +1167,9 @@
         int hash = hash(key);
         if ((e = getNode(hash, key)) != null &&
             (oldValue = e.value) != null) {
+            int mc = modCount;
             V v = remappingFunction.apply(key, oldValue);
+            if (mc != modCount) { throw new ConcurrentModificationException(); }
             if (v != null) {
                 e.value = v;
                 afterNodeAccess(e);
@@ -1156,6 +1181,16 @@
         return null;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link ConcurrentModificationException} if it is detected that the
+     * remapping function modifies this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * remapping function modified this map
+     */
     @Override
     public V compute(K key,
                      BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
@@ -1185,7 +1220,9 @@
             }
         }
         V oldValue = (old == null) ? null : old.value;
+        int mc = modCount;
         V v = remappingFunction.apply(key, oldValue);
+        if (mc != modCount) { throw new ConcurrentModificationException(); }
         if (old != null) {
             if (v != null) {
                 old.value = v;
@@ -1202,13 +1239,23 @@
                 if (binCount >= TREEIFY_THRESHOLD - 1)
                     treeifyBin(tab, hash);
             }
-            ++modCount;
+            modCount = mc + 1;
             ++size;
             afterNodeInsertion(true);
         }
         return v;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link ConcurrentModificationException} if it is detected that the
+     * remapping function modifies this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * remapping function modified this map
+     */
     @Override
     public V merge(K key, V value,
                    BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
@@ -1241,10 +1288,15 @@
         }
         if (old != null) {
             V v;
-            if (old.value != null)
+            if (old.value != null) {
+                int mc = modCount;
                 v = remappingFunction.apply(old.value, value);
-            else
+                if (mc != modCount) {
+                    throw new ConcurrentModificationException();
+                }
+            } else {
                 v = value;
+            }
             if (v != null) {
                 old.value = v;
                 afterNodeAccess(old);
--- a/src/java.base/share/classes/java/util/Hashtable.java	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/classes/java/util/Hashtable.java	Mon Apr 06 10:35:59 2015 -0700
@@ -1000,6 +1000,16 @@
         return null;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link java.util.ConcurrentModificationException} if the mapping
+     * function modified this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * mapping function modified this map
+     */
     @Override
     public synchronized V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
         Objects.requireNonNull(mappingFunction);
@@ -1016,7 +1026,9 @@
             }
         }
 
+        int mc = modCount;
         V newValue = mappingFunction.apply(key);
+        if (mc != modCount) { throw new ConcurrentModificationException(); }
         if (newValue != null) {
             addEntry(hash, key, newValue, index);
         }
@@ -1024,6 +1036,16 @@
         return newValue;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link java.util.ConcurrentModificationException} if the remapping
+     * function modified this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * remapping function modified this map
+     */
     @Override
     public synchronized V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
         Objects.requireNonNull(remappingFunction);
@@ -1035,14 +1057,18 @@
         Entry<K,V> e = (Entry<K,V>)tab[index];
         for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
             if (e.hash == hash && e.key.equals(key)) {
+                int mc = modCount;
                 V newValue = remappingFunction.apply(key, e.value);
+                if (mc != modCount) {
+                    throw new ConcurrentModificationException();
+                }
                 if (newValue == null) {
                     if (prev != null) {
                         prev.next = e.next;
                     } else {
                         tab[index] = e.next;
                     }
-                    modCount++;
+                    modCount = mc + 1;
                     count--;
                 } else {
                     e.value = newValue;
@@ -1052,7 +1078,16 @@
         }
         return null;
     }
-
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link java.util.ConcurrentModificationException} if the remapping
+     * function modified this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * remapping function modified this map
+     */
     @Override
     public synchronized V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
         Objects.requireNonNull(remappingFunction);
@@ -1064,14 +1099,18 @@
         Entry<K,V> e = (Entry<K,V>)tab[index];
         for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
             if (e.hash == hash && Objects.equals(e.key, key)) {
+                int mc = modCount;
                 V newValue = remappingFunction.apply(key, e.value);
+                if (mc != modCount) {
+                    throw new ConcurrentModificationException();
+                }
                 if (newValue == null) {
                     if (prev != null) {
                         prev.next = e.next;
                     } else {
                         tab[index] = e.next;
                     }
-                    modCount++;
+                    modCount = mc + 1;
                     count--;
                 } else {
                     e.value = newValue;
@@ -1080,7 +1119,9 @@
             }
         }
 
+        int mc = modCount;
         V newValue = remappingFunction.apply(key, null);
+        if (mc != modCount) { throw new ConcurrentModificationException(); }
         if (newValue != null) {
             addEntry(hash, key, newValue, index);
         }
@@ -1088,6 +1129,16 @@
         return newValue;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This method will, on a best-effort basis, throw a
+     * {@link java.util.ConcurrentModificationException} if the remapping
+     * function modified this map during computation.
+     *
+     * @throws ConcurrentModificationException if it is detected that the
+     * remapping function modified this map
+     */
     @Override
     public synchronized V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
         Objects.requireNonNull(remappingFunction);
@@ -1099,14 +1150,18 @@
         Entry<K,V> e = (Entry<K,V>)tab[index];
         for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
             if (e.hash == hash && e.key.equals(key)) {
+                int mc = modCount;
                 V newValue = remappingFunction.apply(e.value, value);
+                if (mc != modCount) {
+                    throw new ConcurrentModificationException();
+                }
                 if (newValue == null) {
                     if (prev != null) {
                         prev.next = e.next;
                     } else {
                         tab[index] = e.next;
                     }
-                    modCount++;
+                    modCount = mc + 1;
                     count--;
                 } else {
                     e.value = newValue;
--- a/src/java.base/share/classes/java/util/Map.java	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/classes/java/util/Map.java	Mon Apr 06 10:35:59 2015 -0700
@@ -894,8 +894,8 @@
      * to {@code null}), attempts to compute its value using the given mapping
      * function and enters it into this map unless {@code null}.
      *
-     * <p>If the function returns {@code null} no mapping is recorded. If
-     * the function itself throws an (unchecked) exception, the
+     * <p>If the mapping function returns {@code null}, no mapping is recorded.
+     * If the mapping function itself throws an (unchecked) exception, the
      * exception is rethrown, and no mapping is recorded.  The most
      * common usage is to construct a new object serving as an initial
      * mapped value or memoized result, as in:
@@ -911,6 +911,7 @@
      * map.computeIfAbsent(key, k -> new HashSet<V>()).add(v);
      * }</pre>
      *
+     * <p>The mapping function should not modify this map during computation.
      *
      * @implSpec
      * The default implementation is equivalent to the following steps for this
@@ -925,16 +926,27 @@
      * }
      * }</pre>
      *
+     * <p>The default implementation makes no guarantees about detecting if the
+     * mapping function modifies this map during computation and, if
+     * appropriate, reporting an error. Non-concurrent implementations should
+     * override this method and, on a best-effort basis, throw a
+     * {@code ConcurrentModificationException} if it is detected that the
+     * mapping function modifies this map during computation. Concurrent
+     * implementations should override this method and, on a best-effort basis,
+     * throw an {@code IllegalStateException} if it is detected that the
+     * mapping function modifies this map during computation and as a result
+     * computation would never complete.
+     *
      * <p>The default implementation makes no guarantees about synchronization
      * or atomicity properties of this method. Any implementation providing
      * atomicity guarantees must override this method and document its
      * concurrency properties. In particular, all implementations of
      * subinterface {@link java.util.concurrent.ConcurrentMap} must document
-     * whether the function is applied once atomically only if the value is not
-     * present.
+     * whether the mapping function is applied once atomically only if the value
+     * is not present.
      *
      * @param key key with which the specified value is to be associated
-     * @param mappingFunction the function to compute a value
+     * @param mappingFunction the mapping function to compute a value
      * @return the current (existing or computed) value associated with
      *         the specified key, or null if the computed value is null
      * @throws NullPointerException if the specified key is null and
@@ -967,10 +979,12 @@
      * If the value for the specified key is present and non-null, attempts to
      * compute a new mapping given the key and its current mapped value.
      *
-     * <p>If the function returns {@code null}, the mapping is removed.  If the
-     * function itself throws an (unchecked) exception, the exception is
-     * rethrown, and the current mapping is left unchanged.
-    *
+     * <p>If the remapping function returns {@code null}, the mapping is removed.
+     * If the remapping function itself throws an (unchecked) exception, the
+     * exception is rethrown, and the current mapping is left unchanged.
+     *
+     * <p>The remapping function should not modify this map during computation.
+     *
      * @implSpec
      * The default implementation is equivalent to performing the following
      * steps for this {@code map}, then returning the current value or
@@ -987,16 +1001,27 @@
      * }
      * }</pre>
      *
+     * <p>The default implementation makes no guarantees about detecting if the
+     * remapping function modifies this map during computation and, if
+     * appropriate, reporting an error. Non-concurrent implementations should
+     * override this method and, on a best-effort basis, throw a
+     * {@code ConcurrentModificationException} if it is detected that the
+     * remapping function modifies this map during computation. Concurrent
+     * implementations should override this method and, on a best-effort basis,
+     * throw an {@code IllegalStateException} if it is detected that the
+     * remapping function modifies this map during computation and as a result
+     * computation would never complete.
+     *
      * <p>The default implementation makes no guarantees about synchronization
      * or atomicity properties of this method. Any implementation providing
      * atomicity guarantees must override this method and document its
      * concurrency properties. In particular, all implementations of
      * subinterface {@link java.util.concurrent.ConcurrentMap} must document
-     * whether the function is applied once atomically only if the value is not
-     * present.
+     * whether the remapping function is applied once atomically only if the
+     * value is not present.
      *
      * @param key key with which the specified value is to be associated
-     * @param remappingFunction the function to compute a value
+     * @param remappingFunction the remapping function to compute a value
      * @return the new value associated with the specified key, or null if none
      * @throws NullPointerException if the specified key is null and
      *         this map does not support null keys, or the
@@ -1037,10 +1062,12 @@
      * map.compute(key, (k, v) -> (v == null) ? msg : v.concat(msg))}</pre>
      * (Method {@link #merge merge()} is often simpler to use for such purposes.)
      *
-     * <p>If the function returns {@code null}, the mapping is removed (or
-     * remains absent if initially absent).  If the function itself throws an
-     * (unchecked) exception, the exception is rethrown, and the current mapping
-     * is left unchanged.
+     * <p>If the remapping function returns {@code null}, the mapping is removed
+     * (or remains absent if initially absent).  If the remapping function
+     * itself throws an (unchecked) exception, the exception is rethrown, and
+     * the current mapping is left unchanged.
+     *
+     * <p>The remapping function should not modify this map during computation.
      *
      * @implSpec
      * The default implementation is equivalent to performing the following
@@ -1063,16 +1090,27 @@
      * }
      * }</pre>
      *
+     * <p>The default implementation makes no guarantees about detecting if the
+     * remapping function modifies this map during computation and, if
+     * appropriate, reporting an error. Non-concurrent implementations should
+     * override this method and, on a best-effort basis, throw a
+     * {@code ConcurrentModificationException} if it is detected that the
+     * remapping function modifies this map during computation. Concurrent
+     * implementations should override this method and, on a best-effort basis,
+     * throw an {@code IllegalStateException} if it is detected that the
+     * remapping function modifies this map during computation and as a result
+     * computation would never complete.
+     *
      * <p>The default implementation makes no guarantees about synchronization
      * or atomicity properties of this method. Any implementation providing
      * atomicity guarantees must override this method and document its
      * concurrency properties. In particular, all implementations of
      * subinterface {@link java.util.concurrent.ConcurrentMap} must document
-     * whether the function is applied once atomically only if the value is not
-     * present.
+     * whether the remapping function is applied once atomically only if the
+     * value is not present.
      *
      * @param key key with which the specified value is to be associated
-     * @param remappingFunction the function to compute a value
+     * @param remappingFunction the remapping function to compute a value
      * @return the new value associated with the specified key, or null if none
      * @throws NullPointerException if the specified key is null and
      *         this map does not support null keys, or the
@@ -1121,9 +1159,11 @@
      * map.merge(key, msg, String::concat)
      * }</pre>
      *
-     * <p>If the function returns {@code null} the mapping is removed.  If the
-     * function itself throws an (unchecked) exception, the exception is
-     * rethrown, and the current mapping is left unchanged.
+     * <p>If the remapping function returns {@code null}, the mapping is removed.
+     * If the remapping function itself throws an (unchecked) exception, the
+     * exception is rethrown, and the current mapping is left unchanged.
+     *
+     * <p>The remapping function should not modify this map during computation.
      *
      * @implSpec
      * The default implementation is equivalent to performing the following
@@ -1140,19 +1180,31 @@
      *     map.put(key, newValue);
      * }</pre>
      *
+     * <p>The default implementation makes no guarantees about detecting if the
+     * remapping function modifies this map during computation and, if
+     * appropriate, reporting an error. Non-concurrent implementations should
+     * override this method and, on a best-effort basis, throw a
+     * {@code ConcurrentModificationException} if it is detected that the
+     * remapping function modifies this map during computation. Concurrent
+     * implementations should override this method and, on a best-effort basis,
+     * throw an {@code IllegalStateException} if it is detected that the
+     * remapping function modifies this map during computation and as a result
+     * computation would never complete.
+     *
      * <p>The default implementation makes no guarantees about synchronization
      * or atomicity properties of this method. Any implementation providing
      * atomicity guarantees must override this method and document its
      * concurrency properties. In particular, all implementations of
      * subinterface {@link java.util.concurrent.ConcurrentMap} must document
-     * whether the function is applied once atomically only if the value is not
-     * present.
+     * whether the remapping function is applied once atomically only if the
+     * value is not present.
      *
      * @param key key with which the resulting value is to be associated
      * @param value the non-null value to be merged with the existing value
      *        associated with the key or, if no existing value or a null value
      *        is associated with the key, to be associated with the key
-     * @param remappingFunction the function to recompute a value if present
+     * @param remappingFunction the remapping function to recompute a value if
+     *        present
      * @return the new value associated with the specified key, or null if no
      *         value is associated with the key
      * @throws UnsupportedOperationException if the {@code put} operation
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/Exported.java	Mon Apr 06 10:35:59 2015 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk;
+
+import java.lang.annotation.*;
+
+/**
+  * Indicates whether or not a JDK specific type or package is an
+  * exported part of the JDK suitable for use outside of the JDK
+  * implementation itself.
+  *
+  * This annotation should only be applied to types and packages
+  * <em>outside</em> of the Java SE namespaces of {@code java.*} and
+  * {@code javax.*} packages.  For example, certain portions of {@code
+  * com.sun.*} are official parts of the JDK meant to be generally
+  * usable while other portions of {@code com.sun.*} are not.  This
+  * annotation type allows those portions to be easily and
+  * programmatically distinguished.
+  *
+  * <p>If in one release a type or package is
+  * <code>@Exported(true)</code>, in a subsequent major release such a
+  * type or package can transition to <code>@Exported(false)</code>.
+  *
+  * <p>If a type or package is <code>@Exported(false)</code> in a
+  * release, it may be removed in a subsequent major release.
+  *
+  * <p>If a top-level type has an <code>@Exported</code> annotation,
+  * any nested member types with the top-level type should have an
+  * <code>@Exported</code> annotation with the same value.
+  *
+  * (In exceptional cases, if a nested type is going to be removed
+  * before its enclosing type, the nested type's could be
+  * <code>@Exported(false)</code> while its enclosing type was
+  * <code>@Exported(true)</code>.)
+  *
+  * Likewise, if a package has an <code>@Exported</code> annotation,
+  * top-level types within that package should also have an
+  * <code>@Exported</code> annotation.
+  *
+  * Sometimes a top-level type may have a different
+  * <code>@Exported</code> value than its package.
+  *
+  * @since 1.8
+  */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.PACKAGE})
+@Exported
+public @interface Exported {
+    /**
+     * Whether or not the annotated type or package is an exported
+     * part of the JDK.
+     * @return whether or not the annotated type or package is an exported
+     * part of the JDK
+     */
+    boolean value() default true;
+}
--- a/src/java.base/share/native/libjli/java.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/native/libjli/java.c	Mon Apr 06 10:35:59 2015 -0700
@@ -730,7 +730,7 @@
 static int
 parse_size(const char *s, jlong *result) {
   jlong n = 0;
-  int args_read = sscanf(s, jlong_format_specifier(), &n);
+  int args_read = sscanf(s, JLONG_FORMAT_SPECIFIER, &n);
   if (args_read != 1) {
     return 0;
   }
@@ -798,7 +798,7 @@
              * overflow before the JVM startup code can check to make sure the stack
              * is big enough.
              */
-            if (threadStackSize < STACK_SIZE_MINIMUM) {
+            if (threadStackSize < (jlong)STACK_SIZE_MINIMUM) {
                 threadStackSize = STACK_SIZE_MINIMUM;
             }
         }
--- a/src/java.base/share/native/libjli/java.h	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/native/libjli/java.h	Mon Apr 06 10:35:59 2015 -0700
@@ -144,8 +144,6 @@
 void JLI_ReportExceptionDescription(JNIEnv * env);
 void PrintMachineDependentOptions();
 
-const char *jlong_format_specifier();
-
 /*
  * Block current thread and continue execution in new thread
  */
--- a/src/java.base/share/native/libjli/parse_manifest.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/native/libjli/parse_manifest.c	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -133,7 +133,7 @@
 
 /** Reads count bytes from fd at position pos into given buffer. */
 static jboolean
-readAt(int fd, jlong pos, size_t count, void *buf) {
+readAt(int fd, jlong pos, unsigned int count, void *buf) {
     return (pos >= 0
             && JLI_Lseek(fd, pos, SEEK_SET) == pos
             && read(fd, buf, count) == (jlong) count);
@@ -249,7 +249,7 @@
      */
     if ((pos = JLI_Lseek(fd, -ENDHDR, SEEK_END)) < (jlong)0)
         return (-1);
-    if ((bytes = read(fd, eb, ENDHDR)) < 0)
+    if (read(fd, eb, ENDHDR) < 0)
         return (-1);
     if (ENDSIG_AT(eb)) {
         return find_positions64(fd, eb, pos, base_offset, censtart);
@@ -268,7 +268,13 @@
         return (-1);
     if ((buffer = malloc(END_MAXLEN)) == NULL)
         return (-1);
-    if ((bytes = read(fd, buffer, len)) < 0) {
+
+    /*
+     * read() on windows takes an unsigned int for count. Casting len
+     * to an unsigned int here is safe since it is guaranteed to be
+     * less than END_MAXLEN.
+     */
+    if ((bytes = read(fd, buffer, (unsigned int)len)) < 0) {
         free(buffer);
         return (-1);
     }
@@ -591,7 +597,7 @@
     info->jre_version = NULL;
     info->jre_restrict_search = 0;
     info->splashscreen_image_file_name = NULL;
-    if (rc = find_file(fd, &entry, manifest_name) != 0) {
+    if ((rc = find_file(fd, &entry, manifest_name)) != 0) {
         close(fd);
         return (-2);
     }
@@ -692,7 +698,7 @@
         return (-1);
     }
 
-    if (rc = find_file(fd, &entry, manifest_name) != 0) {
+    if ((rc = find_file(fd, &entry, manifest_name)) != 0) {
         close(fd);
         return (-2);
     }
--- a/src/java.base/share/native/libjli/splashscreen_stubs.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/native/libjli/splashscreen_stubs.c	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,11 +61,11 @@
 #define INVOKEV(name) _INVOKE(name, ,;)
 
 int     DoSplashLoadMemory(void* pdata, int size) {
-    INVOKE(SplashLoadMemory, NULL)(pdata, size);
+    INVOKE(SplashLoadMemory, 0)(pdata, size);
 }
 
 int     DoSplashLoadFile(const char* filename) {
-    INVOKE(SplashLoadFile, NULL)(filename);
+    INVOKE(SplashLoadFile, 0)(filename);
 }
 
 void    DoSplashInit(void) {
@@ -87,4 +87,4 @@
 char*    DoSplashGetScaledImageName(const char* fileName, const char* jarName,
                                     float* scaleFactor) {
     INVOKE(SplashGetScaledImageName, NULL)(fileName, jarName, scaleFactor);
-}
\ No newline at end of file
+}
--- a/src/java.base/share/native/libjli/wildcard.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/share/native/libjli/wildcard.c	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -274,7 +274,7 @@
 }
 
 static void
-FileList_addSubstring(FileList fl, const char *beg, int len)
+FileList_addSubstring(FileList fl, const char *beg, size_t len)
 {
     char *filename = (char *) JLI_MemAlloc(len+1);
     memcpy(filename, beg, len);
@@ -310,7 +310,7 @@
 FileList_split(const char *path, char sep)
 {
     const char *p, *q;
-    int len = (int)JLI_StrLen(path);
+    size_t len = JLI_StrLen(path);
     int count;
     FileList fl;
     for (count = 1, p = path; p < path + len; p++)
--- a/src/java.base/unix/native/libjli/java_md.h	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/unix/native/libjli/java_md.h	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,12 @@
 #define MAXNAMELEN              PATH_MAX
 #endif
 
+#ifdef _LP64
+#define JLONG_FORMAT_SPECIFIER "%ld"
+#else
+#define JLONG_FORMAT_SPECIFIER "%lld"
+#endif
+
 int UnsetEnv(char *name);
 char *FindExecName(char *program);
 const char *SetExecname(char **argv);
--- a/src/java.base/unix/native/libjli/java_md_common.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/unix/native/libjli/java_md_common.c	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -269,11 +269,6 @@
     return(borrowed_unsetenv(name));
 }
 
-const char *
-jlong_format_specifier() {
-    return "%lld";
-}
-
 jboolean
 IsJavaw()
 {
--- a/src/java.base/unix/native/libjli/java_md_solinux.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/unix/native/libjli/java_md_solinux.c	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -888,7 +888,7 @@
     if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
       void * tmp;
       pthread_join(tid, &tmp);
-      rslt = (int)tmp;
+      rslt = (int)(intptr_t)tmp;
     } else {
      /*
       * Continue execution in current thread if for some reason (e.g. out of
@@ -906,7 +906,7 @@
     if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) {
       void * tmp;
       thr_join(tid, NULL, &tmp);
-      rslt = (int)tmp;
+      rslt = (int)(intptr_t)tmp;
     } else {
       /* See above. Continue in current thread if thr_create() failed */
       rslt = continuation(args);
--- a/src/java.base/windows/native/libjli/cmdtoargs.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/windows/native/libjli/cmdtoargs.c	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,7 @@
     USHORT ch = 0;
     int i;
     jboolean done = JNI_FALSE;
-    int charLength;
+    ptrdiff_t charLength;
 
     *wildcard = JNI_FALSE;
     while (!done) {
@@ -208,10 +208,12 @@
         argv = (StdArg*) JLI_MemRealloc(argv, (nargs+1) * sizeof(StdArg));
         argv[nargs].arg = JLI_StringDup(arg);
         argv[nargs].has_wildcard = wildcard;
-        *arg = NULL;
+        *arg = '\0';
         nargs++;
     } while (src != NULL);
 
+    JLI_MemFree(arg);
+
     stdargc = nargs;
     stdargs = argv;
 }
--- a/src/java.base/windows/native/libjli/java_md.c	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/windows/native/libjli/java_md.c	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -107,7 +107,7 @@
  * GetParamValue("theParam", "theParam=value") returns pointer to "value".
  */
 const char * GetParamValue(const char *paramName, const char *arg) {
-    int nameLen = JLI_StrLen(paramName);
+    size_t nameLen = JLI_StrLen(paramName);
     if (JLI_StrNCmp(paramName, arg, nameLen) == 0) {
         /* arg[nameLen] is valid (may contain final NULL) */
         if (arg[nameLen] == '=') {
@@ -561,7 +561,7 @@
     if (rc < 0) {
         /* apply ansi semantics */
         buffer[size - 1] = '\0';
-        return size;
+        return (int)size;
     } else if (rc == size) {
         /* force a null terminator */
         buffer[size - 1] = '\0';
@@ -728,11 +728,6 @@
     }
 }
 
-const char *
-jlong_format_specifier() {
-    return "%I64d";
-}
-
 /*
  * Block current thread and continue execution in a new thread
  */
@@ -882,7 +877,7 @@
     if (hPreloadAwt == NULL) {
         /* awt.dll is not loaded yet */
         char libraryPath[MAXPATHLEN];
-        int jrePathLen = 0;
+        size_t jrePathLen = 0;
         HMODULE hJava = NULL;
         HMODULE hVerify = NULL;
 
@@ -1004,7 +999,8 @@
 jobjectArray
 CreateApplicationArgs(JNIEnv *env, char **strv, int argc)
 {
-    int i, j, idx, tlen;
+    int i, j, idx;
+    size_t tlen;
     jobjectArray outArray, inArray;
     char *ostart, *astart, **nargv;
     jboolean needs_expansion = JNI_FALSE;
--- a/src/java.base/windows/native/libjli/java_md.h	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.base/windows/native/libjli/java_md.h	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
 #define MAXPATHLEN      MAX_PATH
 #define MAXNAMELEN      MAX_PATH
 
+#define JLONG_FORMAT_SPECIFIER "%I64d"
 
 /*
  * Support for doing cheap, accurate interval timing.
--- a/src/java.logging/share/classes/java/util/logging/LogManager.java	Mon Apr 06 19:09:18 2015 +0400
+++ b/src/java.logging/share/classes/java/util/logging/LogManager.java	Mon Apr 06 10:35:59 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 import java.security.*;
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import sun.misc.JavaAWTAccess;
 import sun.misc.SharedSecrets;
@@ -579,7 +580,8 @@
     // added in the user context.
     class LoggerContext {
         // Table of named Loggers that maps names to Loggers.
-        private final Hashtable<String,LoggerWeakRef> namedLoggers = new Hashtable<>();
+        private final ConcurrentHashMap<String,LoggerWeakRef> namedLoggers =
+                new ConcurrentHashMap<>();
         // Tree of named Loggers
         private final LogNode root;
         private LoggerContext() {
@@ -642,21 +644,44 @@
         }
 
 
-        synchronized Logger findLogger(String name) {
-            // ensure that this context is properly initialized before
-            // looking for loggers.
-            ensureInitialized();
+        Logger findLogger(String name) {
+            // Attempt to find logger without locking.
             LoggerWeakRef ref = namedLoggers.get(name);
-            if (ref == null) {
-                return null;
+            Logger logger = ref == null ? null : ref.get();
+
+            // if logger is not null, then we can return it right away.
+            // if name is "" or "global" and logger is null
+            // we need to fall through and check that this context is
+            // initialized.
+            // if ref is not null and logger is null we also need to
+            // fall through.
+            if (logger != null || (ref == null && !name.isEmpty()
+                    && !name.equals(Logger.GLOBAL_LOGGER_NAME))) {
+                return logger;
             }
-            Logger logger = ref.get();
-            if (logger == null) {
-                // Hashtable holds stale weak reference
-                // to a logger which has been GC-ed.
-                ref.dispose();
+
+            // We either found a stale reference, or we were looking for
+            // "" or "global" and didn't find them.
+            // Make sure context is initialized (has the default loggers),
+            // and look up again, cleaning the stale reference if it hasn't
+            // been cleaned up in between. All this needs to be done inside
+            // a synchronized block.
+            synchronized(this) {
+                // ensure that this context is properly initialized before
+                // looking for loggers.
+                ensureInitialized();
+                ref = namedLoggers.get(name);
+                if (ref == null) {
+                    return null;
+                }
+                logger = ref.get();
+                if (logger == null) {
+                    // The namedLoggers map holds stale weak reference
+                    // to a logger which has been GC-ed.
+                    ref.dispose();
+                }
+                return logger;
             }
-            return logger;
         }
 
         // This method is called before adding a logger to the
@@ -752,7 +777,6 @@
             final LogManager owner = getOwner();
             logger.setLogManager(owner);
             ref = owner.new LoggerWeakRef(logger);
-            namedLoggers.put(name, ref);
 
             // Apply any initial level defined for the new logger, unless
             // the logger's level is already initialized
@@ -789,10 +813,17 @@
             node.walkAndSetParent(logger);
             // new LogNode is ready so tell the LoggerWeakRef about it
             ref.setNode(node);
+
+            // Do not publish 'ref' in namedLoggers before the logger tree
+            // is fully updated - because the named logger will be visible as
+            // soon as it is published in namedLoggers (findLogger takes
+            // benefit of the ConcurrentHashMap implementation of namedLoggers
+            // to avoid synchronizing on retrieval when that is possible).
+            namedLoggers.put(name, ref);
             return true;
         }
 
-        synchronized void removeLoggerRef(String name, LoggerWeakRef ref) {
+        void removeLoggerRef(String name, LoggerWeakRef ref) {
             namedLoggers.remove(name, ref);
         }
 
@@ -800,7 +831,7 @@
             // ensure that this context is properly initialized before
             // returning logger names.
             ensureInitialized();
-            return namedLoggers.keys();
+            return Collections.enumeration(namedLoggers.keySet());
         }
 
         // If logger.getUseParentHandlers() returns 'true' and any of the logger's
@@ -1379,7 +1410,19 @@
         reset();
 
         // Load the properties
-        props.load(ins);
+        try {
+            props.load(ins);
+        } catch (IllegalArgumentException x) {
+            // props.load may throw an IllegalArgumentException if the stream
+            // contains malformed Unicode escape sequences.
+            // We wrap that in an IOException as readConfiguration is
+            // specified to throw IOException if there are problems reading
+            // from the stream.
+            // Note: new IOException(x.getMessage(), x) allow us to get a more
+            // concise error message than new IOException(x);
+            throw new IOException(x.getMessage(), x);
+        }
+
         // Instantiate new configuration objects.
         String names[] = parseClassNames("config");
 
--- a/test/TEST.groups	Mon Apr 06 19:09:18 2015 +0400
+++ b/test/TEST.groups	Mon Apr 06 10:35:59 2015 -0700
@@ -453,7 +453,6 @@
   java/util/jar/JarInputStream/ExtraFileInMetaInf.java \
   java/util/logging/TestLoggerWeakRefLeak.java \
   java/util/zip/3GBZipFiles.sh \
-  jdk/lambda/FDTest.java \
   jdk/lambda/separate/Compiler.java \
   sun/management/jmxremote/bootstrap/JvmstatCountersTest.java \
   sun/management/jmxremote/bootstrap/LocalManagementTest.java \
--- a/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java	Mon Apr 06 19:09:18 2015 +0400
+++ b/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java	Mon Apr 06 10:35:59 2015 -0700
@@ -97,7 +97,7 @@
                 // no datagram received
                 if (sa == null) {
                     if (expectedSender != null) {
-                        throw new RuntimeException("Expected message not recieved");
+                        throw new RuntimeException("Expected message not received");
                     }
                     System.out.println("No message received (correct)");
                     return;
@@ -109,10 +109,15 @@
                 buf.flip();
                 byte[] bytes = new byte[buf.remaining()];
                 buf.get(bytes);
-                int receivedId = Integer.parseInt(new String(bytes));
-
-                System.out.format("Received message from %s (id=0x%x)\n",
-                    sender, receivedId);
+                String s = new String(bytes, "UTF-8");
+                int receivedId = -1;
+                try {
+                    receivedId = Integer.parseInt(s);
+                    System.out.format("Received message from %s (id=0x%x)\n",
+                            sender, receivedId);
+                } catch (NumberFormatException x) {
+                    System.out.format("Received message from %s (msg=%s)\n", sender, s);
+                }
 
                 if (expectedSender == null) {
                     if (receivedId == id)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Map/FunctionalCMEs.java	Mon Apr 06 10:35:59 2015 -0700
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.util.Arrays;
+import java.util.ConcurrentModificationException;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.function.BiFunction;
+
+import org.testng.annotations.Test;
+import org.testng.annotations.DataProvider;
+
+/**
+ * @test
+ * @bug 8071667
+ * @summary Ensure that ConcurrentModificationExceptions are thrown as specified from Map methods that accept Functions
+ * @author bchristi
+ * @build Defaults
+ * @run testng FunctionalCMEs
+ */
+public class FunctionalCMEs {
+    final static String KEY = "key";
+
+    @DataProvider(name = "Maps", parallel = true)
+    private static Iterator<Object[]> makeMaps() {
+        return Arrays.asList(
+                // Test maps that CME
+                new Object[]{new HashMap<>(), true},
+                new Object[]{new Hashtable<>(), true},
+                new Object[]{new LinkedHashMap<>(), true},
+                // Test default Map methods - no CME
+                new Object[]{new Defaults.ExtendsAbstractMap<>(), false}
+        ).iterator();
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testComputeIfAbsent(Map<String,String> map, boolean expectCME) {
+        checkCME(() -> {
+            map.computeIfAbsent(KEY, k -> {
+                putToForceRehash(map);
+                return "computedValue";
+            });
+        }, expectCME);
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testCompute(Map<String,String> map, boolean expectCME) {
+        checkCME(() -> {
+            map.compute(KEY, mkBiFunc(map));
+        }, expectCME);
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testComputeWithKeyMapped(Map<String,String> map, boolean expectCME) {
+        map.put(KEY, "firstValue");
+        checkCME(() -> {
+            map.compute(KEY, mkBiFunc(map));
+        }, expectCME);
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testComputeIfPresent(Map<String,String> map, boolean expectCME) {
+        map.put(KEY, "firstValue");
+        checkCME(() -> {
+           map.computeIfPresent(KEY, mkBiFunc(map));
+        }, expectCME);
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testMerge(Map<String,String> map, boolean expectCME) {
+        map.put(KEY, "firstValue");
+        checkCME(() -> {
+            map.merge(KEY, "nextValue", mkBiFunc(map));
+        }, expectCME);
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testForEach(Map<String,String> map, boolean ignored) {
+        checkCME(() -> {
+            map.put(KEY, "firstValue");
+            putToForceRehash(map);
+            map.forEach((k,v) -> {
+                map.remove(KEY);
+            });
+        }, true);
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testReplaceAll(Map<String,String> map, boolean ignored) {
+        checkCME(() -> {
+            map.put(KEY, "firstValue");
+            putToForceRehash(map);
+            map.replaceAll((k,v) -> {
+                map.remove(KEY);
+                return "computedValue";
+            });
+        },true);
+    }
+
+    private static void checkCME(Runnable code, boolean expectCME) {
+        try {
+            code.run();
+        } catch (ConcurrentModificationException cme) {
+            if (expectCME) { return; } else { throw cme; }
+        }
+        if (expectCME) {
+            throw new RuntimeException("Expected CME, but wasn't thrown");
+        }
+    }
+
+    private static BiFunction<String,String,String> mkBiFunc(Map<String,String> map) {
+        return (k,v) -> {
+            putToForceRehash(map);
+            return "computedValue";
+        };
+    }
+
+    private static void putToForceRehash(Map<String,String> map) {
+        for (int i = 0; i < 64; ++i) {
+            map.put(i + "", "value");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/LogManager/Configuration/InvalidEscapeConfigurationTest.java	Mon Apr 06 10:35:59 2015 -0700
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Properties;
+import java.util.logging.LogManager;
+
+
+/**
+ * @test
+ * @bug 8075810
+ * @run main/othervm InvalidEscapeConfigurationTest
+ * @author danielfuchs
+ */
+public class InvalidEscapeConfigurationTest {
+
+    public static void main(String[] args)
+            throws UnsupportedEncodingException, IOException {
+        String[] validEscapes = {
+            "com.f\\u006fo.level = INF\\u004f",
+            "com.f\\u006fo.level = INFO",
+            "com.foo.level = INF\\u004f"
+        };
+        String[] invalidEscapes = {
+            "com.fo\\u0O6f.level = INF\\u0O4f",
+            "com.fo\\u0O6f.level = INFO",
+            "com.foo.level = INF\\u0O4f"
+        };
+        for (String line : validEscapes) {
+            test(line, true);
+        }
+        for (String line : invalidEscapes) {
+            test(line, false);
+        }
+        try {
+            Properties props = new Properties();
+            props.load((InputStream)null);
+            throw new RuntimeException("Properties.load(null): "
+                    + "NullPointerException exception not raised");
+        } catch (NullPointerException x) {
+            System.out.println("Properties.load(null): "
+                    + "got expected exception: " + x);
+        }
+        try {
+            LogManager.getLogManager().readConfiguration(null);
+            throw new RuntimeException("LogManager.readConfiguration(null): "
+                    + "NullPointerException exception not raised");
+        } catch (NullPointerException x) {
+            System.out.println("LogManager.readConfiguration(null): "
+                    + "got expected exception: " + x);
+        }
+
+
+    }
+
+    public static void test(String line, boolean valid) throws IOException {
+        String test = (valid ? "valid" : "invalid")
+                + " line \"" +line + "\"";
+        System.out.println("Testing " + test);
+
+        // First verify that we get the expected result from Properties.load()
+        try {
+            ByteArrayInputStream bais =
+                    new ByteArrayInputStream(line.getBytes("UTF-8"));
+            Properties props = new Properties();
+            props.load(bais);
+            if (!valid) {
+                throw new RuntimeException(test
+                        + "\n\tProperties.load: expected exception not raised");
+            } else {
+                System.out.println("Properties.load passed for " + test);
+            }
+        } catch(IllegalArgumentException x) {
+            if (!valid) {
+                System.out.println(
+                        "Properties.load: Got expected exception: "
+                        + x + "\n\tfor " + test);
+            } else {
+                throw x;
+            }
+        }
+
+        // Then verify that we get the expected result from
+        // LogManager.readConfiguration
+        try {
+            String content = defaultConfiguration() + '\n' + line + '\n';
+            ByteArrayInputStream bais =
+                    new ByteArrayInputStream(content.getBytes("UTF-8"));
+            LogManager.getLogManager().readConfiguration(bais);
+            if (!valid) {
+                throw new RuntimeException(test
+                        + "\n\tLogManager.readConfiguration: "
+                        + "expected exception not raised");
+            } else {
+                System.out.println("LogManager.readConfiguration passed for "
+                        + test);
+            }
+        } catch(IOException x) {
+            if (!valid) {
+                System.out.println(
+                        "LogManager.readConfiguration: Got expected exception: "
+                        + x + "\n\tfor " + test);
+            } else {
+                throw x;
+            }
+        }
+    }
+
+    static String getConfigurationFileName() {
+        String fname = System.getProperty("java.util.logging.config.file");
+        if (fname == null) {
+            fname = System.getProperty("java.home");
+            if (fname == null) {
+                throw new Error("Can't find java.home ??");
+            }
+            fname = Paths.get(fname, "conf", "logging.properties")
+                    .toAbsolutePath().normalize().toString();
+        }
+        return fname;
+    }
+
+    static String defaultConfiguration() throws IOException {
+        Properties props = new Properties();
+        String fileName = getConfigurationFileName();
+        if (Files.exists(Paths.get(fileName))) {
+            try (InputStream is = new FileInputStream(fileName);) {
+                props.load(is);
+            } catch(IOException x) {
+                throw new UncheckedIOException(x);
+            }
+        }
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        props.store(bos, null);
+        return bos.toString();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/LogManager/TestLoggerNames.java	Mon Apr 06 10:35:59 2015 -0700
@@ -0,0 +1,239 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.Phaser;
+import java.util.concurrent.Semaphore;
+import java.util.logging.Handler;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+
+
+/**
+ * @test
+ * @bug 7113878
+ * @summary This is not a test that will check that 7113878 is fixed, but
+ *          rather a test that will invoke the modified code & try to verify
+ *          that fixing 7113878 has not introduced some big regression.
+ *          This test should pass, whether 7113878 is there or not.
+ * @run main/othervm TestLoggerNames
+ * @author danielfuchs
+ */
+public class TestLoggerNames {
+
+    static final class TestLogger extends java.util.logging.Logger {
+
+        final Semaphore sem = new Semaphore(0);
+        final Semaphore wait = new Semaphore(0);
+
+        public TestLogger(String name, String resourceBundleName) {
+            super(name, resourceBundleName);
+        }
+
+        @Override
+        public Handler[] getHandlers() {
+           boolean found = false;
+           try {
+                System.out.println("Entering "+getName()+" getHandlers()");
+                for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
+                    if (LogManager.class.getName().equals(ste.getClassName())
+                            && "reset".equals(ste.getMethodName())) {
+                        found = true;
+                        System.out.println(getName()+" getHandlers() called by " + ste);
+                    }
+                }
+                sem.release();
+                try {
+                    System.out.println("TestLogger: Acquiring wait for "+getName());
+                    wait.acquire();
+                    try {
+                        System.out.println("TestLogger: Acquired wait for "+getName());
+                        return super.getHandlers();
+                    } finally {
+                        System.out.println("TestLogger: Releasing wait for "+getName());
+                        wait.release();
+                    }
+                } finally {
+                    System.out.println("Unblocking "+getName());
+                    sem.acquire();
+                    System.out.println("Unblocked "+getName());
+                    if (found) {
+                        System.out.println("Reset will proceed...");
+                    }
+                }
+            } catch (InterruptedException x) {
+                throw new IllegalStateException(x);
+            }
+        }
+    }
+
+    static volatile boolean stop;
+    static volatile Throwable resetFailed;
+    static volatile Throwable checkLoggerNamesFailed;
+    static volatile Phaser phaser = new Phaser(2);
+
+
+    static void checkLoggerNames(List<Logger> loggers) {
+        Enumeration<String> names = LogManager.getLogManager().getLoggerNames();
+        if (names instanceof Iterator) {
+            for (Iterator<?> it = Iterator.class.cast(names); it.hasNext(); ) {
+                try {
+                    it.remove();
+                    throw new RuntimeException("Iterator supports remove!");
+                } catch (UnsupportedOperationException x) {
+                    System.out.println("OK: Iterator doesn't support remove.");
+                }
+            }
+        }
+        List<String> loggerNames = Collections.list(names);
+        if (!loggerNames.contains("")) {
+            throw new RuntimeException("\"\"" +
+                    " not found in " + loggerNames);
+        }
+        if (!loggerNames.contains("global")) {
+            throw new RuntimeException("global" +
+                    " not found in " + loggerNames);
+        }
+        for (Logger l : loggers) {
+            if (!loggerNames.contains(l.getName())) {
+                throw new RuntimeException(l.getName() +
+                        " not found in " + loggerNames);
+            }
+        }
+        System.out.println("Got all expected logger names");
+    }
+
+
+    public static void main(String[] args) throws InterruptedException {
+        LogManager.getLogManager().addLogger(new TestLogger("com.foo.bar.zzz", null));
+        try {
+            Logger.getLogger(null);
+            throw new RuntimeException("Logger.getLogger(null) didn't throw expected NPE");
+        } catch (NullPointerException x) {
+            System.out.println("Got expected NullPointerException for Logger.getLogger(null)");
+        }
+        List<Logger> loggers = new CopyOnWriteArrayList<>();
+        loggers.add(Logger.getLogger("one.two.addMeAChild"));
+        loggers.add(Logger.getLogger("aaa.bbb.replaceMe"));
+        loggers.add(Logger.getLogger("bbb.aaa.addMeAChild"));
+        TestLogger test = (TestLogger)Logger.getLogger("com.foo.bar.zzz");
+        loggers.add(Logger.getLogger("ddd.aaa.addMeAChild"));
+
+        checkLoggerNames(loggers);
+
+        Thread loggerNamesThread = new Thread(() -> {
+            try {
+                while (!stop) {
+                    checkLoggerNames(loggers);
+                    Thread.sleep(10);
+                    if (!stop) {
+                        phaser.arriveAndAwaitAdvance();
+                    }
+                }
+            } catch (Throwable t) {
+                t.printStackTrace(System.err);
+                checkLoggerNamesFailed = t;
+            }
+        }, "loggerNames");
+
+        Thread resetThread = new Thread(() -> {
+            try {
+                System.out.println("Calling reset...");
+                LogManager.getLogManager().reset();
+                System.out.println("Reset done...");
+                System.out.println("Reset again...");
+                LogManager.getLogManager().reset();
+                System.out.println("Reset done...");
+            } catch(Throwable t) {
+                resetFailed = t;
+                System.err.println("Unexpected exception or error in reset Thread");
+                t.printStackTrace(System.err);
+            }
+        }, "reset");
+
+        resetThread.setDaemon(true);
+        resetThread.start();
+
+        System.out.println("Waiting for reset to get handlers");
+        test.sem.acquire();
+        try {
+            loggerNamesThread.start();
+            System.out.println("Reset has called getHandlers on " + test.getName());
+            int i = 0;
+            for (Enumeration<String> e = LogManager.getLogManager().getLoggerNames();
+                e.hasMoreElements();) {
+                String name = e.nextElement();
+                if (name.isEmpty()) continue;
+                if (name.endsWith(".addMeAChild")) {
+                    Logger l =  Logger.getLogger(name+".child");
+                    loggers.add(l);
+                    System.out.println("*** Added " + l.getName());
+                    i++;
+                } else if (name.endsWith("replaceMe")) {
+                    Logger l = Logger.getLogger(name);
+                    loggers.remove(l);
+                    l = Logger.getLogger(name.replace("replaceMe", "meReplaced"));
+                    loggers.add(l);
+                    System.gc();
+                    if (LogManager.getLogManager().getLogger(name) == null) {
+                        System.out.println("*** "+ name + " successfully replaced with " + l.getName());
+                    }
+                    i++;
+                } else {
+                    System.out.println("Nothing to do for logger: " + name);
+                }
+                phaser.arriveAndAwaitAdvance();
+                if (i >= 3 && i++ == 3) {
+                    System.out.println("Loggers are now: " +
+                            Collections.list(LogManager.getLogManager().getLoggerNames()));
+                    test.wait.release();
+                    test.sem.release();
+                    System.out.println("Joining " + resetThread);
+                    resetThread.join();
+                }
+            }
+        } catch (RuntimeException | InterruptedException | Error x) {
+            test.wait.release();
+            test.sem.release();
+            throw x;
+        } finally {
+            stop = true;
+            phaser.arriveAndDeregister();
+            loggerNamesThread.join();
+            loggers.clear();
+        }
+
+
+        if (resetFailed != null || checkLoggerNamesFailed != null) {
+            RuntimeException r = new RuntimeException("Some of the concurrent threads failed");
+            if (resetFailed != null) r.addSuppressed(resetFailed);
+            if (checkLoggerNamesFailed != null) r.addSuppressed(checkLoggerNamesFailed);
+            throw r;
+        }
+
+    }
+
+}
--- a/test/javax/xml/jaxp/transform/8062923/XslSubstringTest.java	Mon Apr 06 19:09:18 2015 +0400
+++ b/test/javax/xml/jaxp/transform/8062923/XslSubstringTest.java	Mon Apr 06 10:35:59 2015 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 8062923 8062924 8074297
+ * @bug 8062923 8062924 8074297 8076290
  * @run testng XslSubstringTest
  * @summary Test xsl substring function with negative, Inf and
  * NaN length and few other use cases. Also test proper
@@ -59,12 +59,15 @@
             { "|<xsl:value-of select=\"substring('asdf',2, 1 div 0)\"/>|", "<t>|sdf|</t>"},
             { "|<xsl:value-of select=\"substring('asdf',2, -0 div 0)\"/>|", "<t>||</t>" },
             { "|<xsl:value-of select=\"substring('asdf',2, 1 div 0)\"/>|", "<t>|sdf|</t>" },
+            // 8076290 bug test case
+            { "|<xsl:value-of select=\"substring('123', 0, 3)\"/>|", "<t>|12|</t>"},
         };
     }
 
     @DataProvider(name = "SupplementaryCharactersTestData")
-    private Object[][] bug8074297() {
+    private Object[][] dataSupplementaryCharacters() {
         return new Object[][] {
+            // 8074297 bug test cases
             { "|<xsl:value-of select=\"substring('&#131083;ABC', 3)\"/>|",    "<t>|BC|</t>"},
             { "|<xsl:value-of select=\"substring('&#131083;ABC', 3, 1)\"/>|", "<t>|B|</t>" },
             { "|<xsl:value-of select=\"substring('&#131083;ABC', 2, 2)\"/>|", "<t>|AB|</t>"},
@@ -74,6 +77,8 @@
             { "|<xsl:value-of select=\"substring('&#131083;ABC', 2, 1)\"/>|", "<t>|A|</t>"},
             { "|<xsl:value-of select=\"substring('&#131083;ABC', 1, 1 div 0)\"/>|", "<t>|&#131083;ABC|</t>"},
             { "|<xsl:value-of select=\"substring('&#131083;ABC', -10, 1 div 0)\"/>|", "<t>|&#131083;ABC|</t>"},
+            // 8076290 bug test case
+            { "|<xsl:value-of select=\"substring('&#131083;ABC', 0, 2)\"/>|", "<t>|&#131083;|</t>"},
         };
     }
 
--- a/test/jdk/lambda/FDTest.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-import shapegen.*;
-
-import com.sun.source.util.JavacTask;
-import com.sun.tools.javac.util.Pair;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.tools.Diagnostic;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
-
-import org.testng.annotations.Test;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.DataProvider;
-import static org.testng.Assert.*;
-
-public class FDTest {
-
-    public enum TestKind {
-        POSITIVE,
-        NEGATIVE;
-
-        Collection<Hierarchy> getHierarchy(HierarchyGenerator hg) {
-            return this == POSITIVE ?
-                    hg.getOK() : hg.getErr();
-        }
-    }
-
-    public static JavaCompiler comp;
-    public static StandardJavaFileManager fm;
-
-    @BeforeSuite
-    static void init() {
-        // create default shared JavaCompiler - reused across multiple
-        // compilations
-
-        comp = ToolProvider.getSystemJavaCompiler();
-        fm = comp.getStandardFileManager(null, null, null);
-    }
-
-    public static void main(String[] args) throws Exception {
-        init();
-
-        for (Pair<TestKind,Hierarchy> fdtest : generateCases()) {
-            runTest(fdtest.fst, fdtest.snd, comp, fm);
-        }
-    }
-
-    @Test(dataProvider = "fdCases")
-    public void testOneCase(TestKind tk, Hierarchy hs)
-            throws Exception {
-        FDTest.runTest(tk, hs, comp, fm);
-    }
-
-    @DataProvider(name = "fdCases")
-    public Object[][] caseGenerator() {
-        List<Pair<TestKind, Hierarchy>> cases = generateCases();
-        Object[][] fdCases = new Object[cases.size()][];
-        for (int i = 0; i < cases.size(); ++i) {
-            fdCases[i] = new Object[2];
-            fdCases[i][0] = cases.get(i).fst;
-            fdCases[i][1] = cases.get(i).snd;
-        }
-        return fdCases;
-    }
-
-    public static List<Pair<TestKind, Hierarchy>> generateCases() {
-        ArrayList<Pair<TestKind,Hierarchy>> list = new ArrayList<>();
-        HierarchyGenerator hg = new HierarchyGenerator();
-        for (TestKind tk : TestKind.values()) {
-            for (Hierarchy hs : tk.getHierarchy(hg)) {
-                list.add(new Pair<>(tk, hs));
-            }
-        }
-        return list;
-    }
-
-    public static void runTest(TestKind tk, Hierarchy hs,
-            JavaCompiler comp, StandardJavaFileManager fm) throws Exception {
-        new FDTest(tk, hs).run(comp, fm);
-    }
-
-    TestKind tk;
-    Hierarchy hs;
-    DefenderTestSource source;
-    DiagnosticChecker diagChecker;
-
-    public FDTest() {}
-
-    FDTest(TestKind tk, Hierarchy hs) {
-        this.tk = tk;
-        this.hs = hs;
-        this.source = new DefenderTestSource();
-        this.diagChecker = new DiagnosticChecker();
-    }
-
-    void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
-        JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
-                null, null, Arrays.asList(source));
-        try {
-            ct.analyze();
-        } catch (Throwable ex) {
-            fail("Error thrown when analyzing the following source:\n" + source.getCharContent(true));
-        }
-        check();
-    }
-
-    void check() {
-        boolean errorExpected = tk == TestKind.NEGATIVE;
-        if (errorExpected != diagChecker.errorFound) {
-            fail("problem in source: \n" +
-                 "\nerror found = " + diagChecker.errorFound +
-                 "\nerror expected = " + errorExpected +
-                 "\n" + dumpHierarchy() +
-                 "\n" + source.getCharContent(true));
-        }
-    }
-
-    String dumpHierarchy() {
-        StringBuilder buf = new StringBuilder();
-        buf.append("root = " + hs.root + "\n");
-        for (ClassCase cc : hs.all) {
-            buf.append("  class name = " + cc.getName() + "\n");
-            buf.append("    class OK = " + cc.get_OK() + "\n");
-            buf.append("    prov = " + cc.get_mprov() + "\n");
-
-        }
-        return buf.toString();
-    }
-
-    class DefenderTestSource extends SimpleJavaFileObject {
-
-        String source;
-
-        public DefenderTestSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            StringBuilder buf = new StringBuilder();
-            List<ClassCase> defaultRef = new ArrayList<>();
-            for (ClassCase cc : hs.all) {
-                Hierarchy.genClassDef(buf, cc, null, defaultRef);
-            }
-            source = buf.toString();
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    static class DiagnosticChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound;
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
-        }
-    }
-}
--- a/test/jdk/lambda/LambdaTranslationInInterface.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
-
-/**
- * @author Robert Field
- */
-
-interface LTII {
-
-    interface ILsp1 {
-        String m();
-    }
-
-    interface ILsp2 {
-        String m(String x);
-    }
-
-    default ILsp1 t1() {
-        return () -> { return "yo"; };
-    }
-
-    default ILsp2 t2() {
-        return (x) -> { return "snur" + x; };
-    }
-
-}
-
-@Test
-public class LambdaTranslationInInterface implements LTII {
-
-    public void testLambdaInDefaultMethod() {
-        assertEquals(t1().m(), "yo");
-        assertEquals(t2().m("p"), "snurp");
-    }
-
-}
--- a/test/jdk/lambda/LambdaTranslationInnerConstructor.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class LambdaTranslationInnerConstructor  {
-
-    public void testLambdaWithInnerConstructor() {
-        assertEquals(seq1().m().toString(), "Cbl:nada");
-        assertEquals(seq2().m("rats").toString(), "Cbl:rats");
-    }
-
-    Ib1 seq1() {
-        return () -> { return new Cbl(); };
-    }
-
-    Ib2 seq2() {
-        return (x) -> { return new Cbl(x); };
-    }
-
-    class Cbl {
-        String val;
-
-        Cbl() {
-            this.val = "nada";
-        }
-
-        Cbl(String z) {
-            this.val = z;
-        }
-
-        public String toString() {
-            return "Cbl:" + val;
-        }
-    }
-
-    interface Ib1 {
-        Object m();
-    }
-
-    interface Ib2 {
-        Object m(String x);
-    }
-}
\ No newline at end of file
--- a/test/jdk/lambda/MethodReferenceTestFDCCE.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-import java.lang.reflect.Array;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-/**
- * Method references and raw types.
- * @author Robert Field
- */
-
-@Test
-@SuppressWarnings({"rawtypes", "unchecked"})
-public class MethodReferenceTestFDCCE {
-
-    static void assertCCE(Throwable t) {
-        assertEquals(t.getClass().getName(), "java.lang.ClassCastException");
-    }
-
-    interface Pred<T> { boolean accept(T x); }
-
-    interface Ps { boolean accept(short x); }
-
-    interface Oo { Object too(int x); }
-
-    interface Reto<T> { T m(); }
-
-    class A {}
-    class B extends A {}
-
-    static boolean isMinor(int x) {
-        return x < 18;
-    }
-
-    static boolean tst(A x) {
-        return true;
-    }
-
-    static Object otst(Object x) {
-        return x;
-    }
-
-    static boolean stst(Short x) {
-        return x < 18;
-    }
-
-    static short ritst() {
-        return 123;
-    }
-
-    public void testMethodReferenceFDPrim1() {
-        Pred<Byte> p = MethodReferenceTestFDCCE::isMinor;
-        Pred p2 = p;
-        assertTrue(p2.accept((Byte)(byte)15));
-    }
-
-    public void testMethodReferenceFDPrim2() {
-        Pred<Byte> p = MethodReferenceTestFDCCE::isMinor;
-        Pred p2 = p;
-        assertTrue(p2.accept((byte)15));
-    }
-
-    public void testMethodReferenceFDPrimICCE() {
-        Pred<Byte> p = MethodReferenceTestFDCCE::isMinor;
-        Pred p2 = p;
-        try {
-            p2.accept(15); // should throw CCE
-            fail("Exception should have been thrown");
-        } catch (Throwable t) {
-            assertCCE(t);
-        }
-    }
-
-    public void testMethodReferenceFDPrimOCCE() {
-        Pred<Byte> p = MethodReferenceTestFDCCE::isMinor;
-        Pred p2 = p;
-        try {
-            p2.accept(new Object()); // should throw CCE
-            fail("Exception should have been thrown");
-        } catch (Throwable t) {
-            assertCCE(t);
-        }
-    }
-
-    public void testMethodReferenceFDRef() {
-        Pred<B> p = MethodReferenceTestFDCCE::tst;
-        Pred p2 = p;
-        assertTrue(p2.accept(new B()));
-    }
-
-    public void testMethodReferenceFDRefCCE() {
-        Pred<B> p = MethodReferenceTestFDCCE::tst;
-        Pred p2 = p;
-        try {
-            p2.accept(new A()); // should throw CCE
-            fail("Exception should have been thrown");
-        } catch (Throwable t) {
-            assertCCE(t);
-        }
-    }
-
-    public void testMethodReferenceFDPrimPrim() {
-        Ps p = MethodReferenceTestFDCCE::isMinor;
-        assertTrue(p.accept((byte)15));
-    }
-
-    public void testMethodReferenceFDPrimBoxed() {
-        Ps p = MethodReferenceTestFDCCE::stst;
-        assertTrue(p.accept((byte)15));
-    }
-
-    public void testMethodReferenceFDPrimRef() {
-        Oo p = MethodReferenceTestFDCCE::otst;
-        assertEquals(p.too(15).getClass().getName(), "java.lang.Integer");
-    }
-
-    public void testMethodReferenceFDRet1() {
-        Reto<Short> p = MethodReferenceTestFDCCE::ritst;
-        assertEquals(p.m(), (Short)(short)123);
-    }
-
-}
\ No newline at end of file
--- a/test/jdk/lambda/MethodReferenceTestInnerDefault.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-interface IDSs { String m(String a); }
-
-interface InDefA {
-    default String xsA__(String s) {
-        return "A__xsA:" + s;
-    }
-
-    default String xsAB_(String s) {
-        return "AB_xsA:" + s;
-    }
-
-}
-
-interface InDefB extends InDefA {
-
-    default String xsAB_(String s) {
-        return "AB_xsB:" + s;
-    }
-
-    default String xs_B_(String s) {
-        return "_B_xsB:" + s;
-    }
-}
-
-@Test
-public class MethodReferenceTestInnerDefault implements InDefB {
-
-    public void testMethodReferenceInnerDefault() {
-        (new In()).testMethodReferenceInnerDefault();
-    }
-
-    class In {
-
-        public void testMethodReferenceInnerDefault() {
-            IDSs q;
-
-            q = MethodReferenceTestInnerDefault.this::xsA__;
-            assertEquals(q.m("*"), "A__xsA:*");
-
-            q = MethodReferenceTestInnerDefault.this::xsAB_;
-            assertEquals(q.m("*"), "AB_xsB:*");
-
-            q = MethodReferenceTestInnerDefault.this::xs_B_;
-            assertEquals(q.m("*"), "_B_xsB:*");
-        }
-    }
-
-}
--- a/test/jdk/lambda/MethodReferenceTestInnerInstance.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestInnerInstance {
-
-    public void testMethodReferenceInnerInstance() {
-        cia().cib().testMethodReferenceInstance();
-    }
-
-    public void testMethodReferenceInnerExternal() {
-        cia().cib().testMethodReferenceExternal();
-    }
-
-    interface SI {
-        String m(Integer a);
-    }
-
-    class CIA {
-
-        String xI(Integer i) {
-            return "xI:" + i;
-        }
-
-        public class CIB {
-
-            public void testMethodReferenceInstance() {
-                SI q;
-
-                q = CIA.this::xI;
-                assertEquals(q.m(55), "xI:55");
-            }
-
-            public void testMethodReferenceExternal() {
-                SI q;
-
-                q = (new E())::xI;
-                assertEquals(q.m(77), "ExI:77");
-            }
-        }
-
-        CIB cib() {
-            return new CIB();
-        }
-
-        class E {
-
-            String xI(Integer i) {
-                return "ExI:" + i;
-            }
-        }
-
-    }
-
-    CIA cia() {
-        return new CIA();
-    }
-}
--- a/test/jdk/lambda/MethodReferenceTestInnerVarArgsThis.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-import java.lang.reflect.Array;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestInnerVarArgsThis {
-
-    interface NsII {
-
-        String m(Integer a, Integer b);
-    }
-
-    interface Nsiii {
-
-        String m(int a, int b, int c);
-    }
-
-    interface Nsi {
-
-        String m(int a);
-    }
-
-    interface NsaO {
-
-        String m(Object[] a);
-    }
-
-    interface Nsai {
-
-        String m(int[] a);
-    }
-
-    interface Nsvi {
-
-        String m(int... va);
-    }
-
-    class CIA {
-
-        String xvI(Integer... vi) {
-            StringBuilder sb = new StringBuilder("xvI:");
-            for (Integer i : vi) {
-                sb.append(i);
-                sb.append("-");
-            }
-            return sb.toString();
-        }
-
-        String xIvI(Integer f, Integer... vi) {
-            StringBuilder sb = new StringBuilder("xIvI:");
-            sb.append(f);
-            for (Integer i : vi) {
-                sb.append(i);
-                sb.append("-");
-            }
-            return sb.toString();
-        }
-
-        String xvi(int... vi) {
-            int sum = 0;
-            for (int i : vi) {
-                sum += i;
-            }
-            return "xvi:" + sum;
-        }
-
-        String xIvi(Integer f, int... vi) {
-            int sum = 0;
-            for (int i : vi) {
-                sum += i;
-            }
-            return "xIvi:(" + f + ")" + sum;
-        }
-
-        String xvO(Object... vi) {
-            StringBuilder sb = new StringBuilder("xvO:");
-            for (Object i : vi) {
-                if (i.getClass().isArray()) {
-                    sb.append("[");
-                    int len = Array.getLength(i);
-                    for (int x = 0; x < len; ++x) {
-                        sb.append(Array.get(i, x));
-                        sb.append(",");
-                    }
-                    sb.append("]");
-
-                } else {
-                    sb.append(i);
-                }
-                sb.append("*");
-            }
-            return sb.toString();
-        }
-
-        public class CIB {
-
-            // These should be processed as var args
-            public void testVarArgsNsSuperclass() {
-                NsII q;
-
-                q = CIA.this::xvO;
-                assertEquals(q.m(55, 66), "xvO:55*66*");
-            }
-
-            public void testVarArgsNsArray() {
-                Nsai q;
-
-                q = CIA.this::xvO;
-                assertEquals(q.m(new int[]{55, 66}), "xvO:[55,66,]*");
-            }
-
-            public void testVarArgsNsII() {
-                NsII q;
-
-                q = CIA.this::xvI;
-                assertEquals(q.m(33, 7), "xvI:33-7-");
-
-                q = CIA.this::xIvI;
-                assertEquals(q.m(50, 40), "xIvI:5040-");
-
-                q = CIA.this::xvi;
-                assertEquals(q.m(100, 23), "xvi:123");
-
-                q = CIA.this::xIvi;
-                assertEquals(q.m(9, 21), "xIvi:(9)21");
-            }
-
-            public void testVarArgsNsiii() {
-                Nsiii q;
-
-                q = CIA.this::xvI;
-                assertEquals(q.m(3, 2, 1), "xvI:3-2-1-");
-
-                q = CIA.this::xIvI;
-                assertEquals(q.m(888, 99, 2), "xIvI:88899-2-");
-
-                q = CIA.this::xvi;
-                assertEquals(q.m(900, 80, 7), "xvi:987");
-
-                q = CIA.this::xIvi;
-                assertEquals(q.m(333, 27, 72), "xIvi:(333)99");
-            }
-
-            public void testVarArgsNsi() {
-                Nsi q;
-
-                q = CIA.this::xvI;
-                assertEquals(q.m(3), "xvI:3-");
-
-                q = CIA.this::xIvI;
-                assertEquals(q.m(888), "xIvI:888");
-
-                q = CIA.this::xvi;
-                assertEquals(q.m(900), "xvi:900");
-
-                q = CIA.this::xIvi;
-                assertEquals(q.m(333), "xIvi:(333)0");
-            }
-
-            // These should NOT be processed as var args
-            public void testVarArgsNsaO() {
-                NsaO q;
-
-                q = CIA.this::xvO;
-                assertEquals(q.m(new String[]{"yo", "there", "dude"}), "xvO:yo*there*dude*");
-            }
-        }
-
-        CIB cib() {
-            return new CIB();
-        }
-
-        class E {
-
-            String xI(Integer i) {
-                return "ExI:" + i;
-            }
-        }
-    }
-
-    CIA cia() {
-        return new CIA();
-    }
-
-    // These should be processed as var args
-    public void testVarArgsNsSuperclass() {
-        cia().cib().testVarArgsNsSuperclass();
-    }
-
-    public void testVarArgsNsArray() {
-        cia().cib().testVarArgsNsArray();
-    }
-
-    public void testVarArgsNsII() {
-        cia().cib().testVarArgsNsII();
-    }
-
-    public void testVarArgsNsiii() {
-        cia().cib().testVarArgsNsiii();
-    }
-
-    public void testVarArgsNsi() {
-        cia().cib().testVarArgsNsi();
-    }
-
-    // These should NOT be processed as var args
-
-    public void testVarArgsNsaO() {
-        cia().cib().testVarArgsNsaO();
-    }
-
-
-}
--- a/test/jdk/lambda/MethodReferenceTestInstance.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-class MethodReferenceTestInstance_E {
-    String xI(Integer i) {
-        return "ExI:" + i;
-    }
-}
-
-@Test
-public class MethodReferenceTestInstance {
-
-    interface SI { String m(Integer a); }
-
-    String xI(Integer i) {
-        return "xI:" + i;
-    }
-
-    public void testMethodReferenceInstance() {
-        SI q;
-
-        q = this::xI;
-        assertEquals(q.m(55), "xI:55");
-    }
-
-    public void testMethodReferenceExternal() {
-        SI q;
-
-        q = (new MethodReferenceTestInstance_E())::xI;
-        assertEquals(q.m(77), "ExI:77");
-    }
-
-}
--- a/test/jdk/lambda/MethodReferenceTestKinds.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestKinds extends MethodReferenceTestKindsSup {
-
-    interface S0 { String get(); }
-    interface S1 { String get(MethodReferenceTestKinds x); }
-    interface S2 { String get(MethodReferenceTestKinds x, MethodReferenceTestKinds y); }
-
-    interface SXN0 { MethodReferenceTestKindsBase make(MethodReferenceTestKinds x); }
-    interface SXN1 { MethodReferenceTestKindsBase make(MethodReferenceTestKinds x, String str); }
-
-    interface SN0 { MethodReferenceTestKindsBase make(); }
-    interface SN1 { MethodReferenceTestKindsBase make(String x); }
-
-    class In extends MethodReferenceTestKindsBase {
-        In(String val) {
-            this.val = val;
-        }
-
-        In() {
-            this("blank");
-        }
-    }
-
-    String instanceMethod0() { return "IM:0-" + this; }
-    String instanceMethod1(MethodReferenceTestKinds x) { return "IM:1-" + this + x; }
-
-    static String staticMethod0() { return "SM:0"; }
-    static String staticMethod1(MethodReferenceTestKinds x) { return "SM:1-" + x; }
-
-    MethodReferenceTestKinds(String val) {
-        super(val);
-    }
-
-    MethodReferenceTestKinds() {
-        super("blank");
-    }
-
-    MethodReferenceTestKinds inst(String val) {
-        return new MethodReferenceTestKinds(val);
-    }
-
-    public void testMRBound() {
-        S0 var = this::instanceMethod0;
-        assertEquals(var.get(), "IM:0-MethodReferenceTestKinds(blank)");
-    }
-
-    public void testMRBoundArg() {
-        S1 var = this::instanceMethod1;
-        assertEquals(var.get(inst("arg")), "IM:1-MethodReferenceTestKinds(blank)MethodReferenceTestKinds(arg)");
-    }
-
-    public void testMRUnbound() {
-        S1 var = MethodReferenceTestKinds::instanceMethod0;
-        assertEquals(var.get(inst("rcvr")), "IM:0-MethodReferenceTestKinds(rcvr)");
-    }
-
-    public void testMRUnboundArg() {
-        S2 var = MethodReferenceTestKinds::instanceMethod1;
-        assertEquals(var.get(inst("rcvr"), inst("arg")), "IM:1-MethodReferenceTestKinds(rcvr)MethodReferenceTestKinds(arg)");
-    }
-
-    public void testMRSuper() {
-        S0 var = super::instanceMethod0;
-        assertEquals(var.get(), "SIM:0-MethodReferenceTestKinds(blank)");
-    }
-
-    public void testMRSuperArg() {
-        S1 var = super::instanceMethod1;
-        assertEquals(var.get(inst("arg")), "SIM:1-MethodReferenceTestKinds(blank)MethodReferenceTestKinds(arg)");
-    }
-
-    public void testMRStatic() {
-        S0 var = MethodReferenceTestKinds::staticMethod0;
-        assertEquals(var.get(), "SM:0");
-    }
-
-    public void testMRStaticArg() {
-        S1 var = MethodReferenceTestKinds::staticMethod1;
-        assertEquals(var.get(inst("arg")), "SM:1-MethodReferenceTestKinds(arg)");
-    }
-
-    public void testMRTopLevel() {
-        SN0 var = MethodReferenceTestKindsBase::new;
-        assertEquals(var.make().toString(), "MethodReferenceTestKindsBase(blank)");
-    }
-
-    public void testMRTopLevelArg() {
-        SN1 var = MethodReferenceTestKindsBase::new;
-        assertEquals(var.make("name").toString(), "MethodReferenceTestKindsBase(name)");
-    }
-/* unbound inner case not supported anymore (dropped by EG)
-    public void testMRUnboundInner() {
-        SXN0 var = MethodReferenceTestKinds.In::new;
-        assertEquals(var.make(inst("out")).toString(), "In(blank)");
-    }
-
-   public void testMRUnboundInnerArg() {
-        SXN1 var = MethodReferenceTestKinds.In::new;
-        assertEquals(var.make(inst("out"), "name").toString(), "In(name)");
-    }
-*/
-    public void testMRImplicitInner() {
-        SN0 var = MethodReferenceTestKinds.In::new;
-        assertEquals(var.make().toString(), "In(blank)");
-    }
-
-    public void testMRImplicitInnerArg() {
-        SN1 var = MethodReferenceTestKinds.In::new;
-        assertEquals(var.make("name").toString(), "In(name)");
-    }
-
-}
-
-
-class MethodReferenceTestKindsBase {
-    String val = "unset";
-
-    public String toString() {
-        return getClass().getSimpleName() + "(" + val + ")";
-    }
-
-    MethodReferenceTestKindsBase(String val) {
-        this.val = val;
-    }
-
-    MethodReferenceTestKindsBase() {
-        this("blank");
-    }
-
-}
-
-class MethodReferenceTestKindsSup extends MethodReferenceTestKindsBase {
-    String instanceMethod0() { return "SIM:0-" + this; }
-    String instanceMethod1(MethodReferenceTestKinds x) { return "SIM:1-" + this + x; }
-
-    MethodReferenceTestKindsSup(String val) {
-        super(val);
-    }
-
-}
-
--- a/test/jdk/lambda/MethodReferenceTestNew.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestNew {
-
-    interface M0<T> {
-
-        T m();
-    }
-
-    static class N0 {
-
-        N0() {
-        }
-    }
-
-    interface M1<T> {
-
-        T m(Integer a);
-    }
-
-    static class N1 {
-
-        int i;
-
-        N1(int i) {
-            this.i = i;
-        }
-    }
-
-    interface M2<T> {
-
-        T m(Integer n, String o);
-    }
-
-    static class N2 {
-
-        Number n;
-        Object o;
-
-        N2(Number n, Object o) {
-            this.n = n;
-            this.o = o;
-        }
-
-        public String toString() {
-            return "N2(" + n + "," + o + ")";
-        }
-    }
-
-    interface MV {
-
-        NV m(Integer ai, int i);
-    }
-
-    static class NV {
-
-        int i;
-
-        NV(int... v) {
-            i = 0;
-            for (int x : v) {
-                i += x;
-            }
-        }
-
-        public String toString() {
-            return "NV(" + i + ")";
-        }
-    }
-
-    public void testConstructorReference0() {
-        M0<N0> q;
-
-        q = N0::new;
-        assertEquals(q.m().getClass().getSimpleName(), "N0");
-    }
-
-    public void testConstructorReference1() {
-        M1<N1> q;
-
-        q = N1::new;
-        assertEquals(q.m(14).getClass().getSimpleName(), "N1");
-    }
-
-    public void testConstructorReference2() {
-        M2<N2> q;
-
-        q = N2::new;
-        assertEquals(q.m(7, "hi").toString(), "N2(7,hi)");
-    }
-
-    public void testConstructorReferenceVarArgs() {
-        MV q;
-
-        q = NV::new;
-        assertEquals(q.m(5, 45).toString(), "NV(50)");
-    }
-
-}
-
--- a/test/jdk/lambda/MethodReferenceTestNewInner.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestNewInner {
-
-    String note = "NO NOTE";
-
-    interface M0<T> {
-
-        T m();
-    }
-
-    interface MP<T> {
-
-        T m(MethodReferenceTestNewInner m);
-    }
-
-    class N0 {
-
-        N0() {
-        }
-    }
-
-    interface M1<T> {
-
-        T m(Integer a);
-    }
-
-    class N1 {
-
-        int i;
-
-        N1(int i) {
-            this.i = i;
-        }
-    }
-
-    interface M2<T> {
-
-        T m(Integer n, String o);
-    }
-
-    class N2 {
-
-        Number n;
-        Object o;
-
-        N2(Number n, Object o) {
-            this.n = n;
-            this.o = o;
-        }
-
-        public String toString() {
-            return note + ":N2(" + n + "," + o + ")";
-        }
-    }
-
-    interface MV {
-
-        NV m(Integer ai, int i);
-    }
-
-    class NV {
-
-        int i;
-
-        NV(int... v) {
-            i = 0;
-            for (int x : v) {
-                i += x;
-            }
-        }
-
-        public String toString() {
-            return note + ":NV(" + i + ")";
-        }
-    }
-
-/* unbound constructor case not supported anymore (dropped by EG)
-    public static void testConstructorReferenceP() {
-        MP<N0> q;
-
-        q = N0::new;
-        assertEquals(q.m(new MethodReferenceTestNewInner()).getClass().getSimpleName(), "N0");
-    }
-*/
-    public void testConstructorReference0() {
-        M0<N0> q;
-
-        q = N0::new;
-        assertEquals(q.m().getClass().getSimpleName(), "N0");
-    }
-
-    public void testConstructorReference1() {
-        M1<N1> q;
-
-        q = N1::new;
-        assertEquals(q.m(14).getClass().getSimpleName(), "N1");
-    }
-
-    public void testConstructorReference2() {
-        M2<N2> q;
-
-        note = "T2";
-        q = N2::new;
-        assertEquals(q.m(7, "hi").toString(), "T2:N2(7,hi)");
-    }
-
-    /***
-    public void testConstructorReferenceVarArgs() {
-        MV q;
-
-        note = "TVA";
-        q = NV::new;
-        assertEquals(q.m(5, 45).toString(), "TNV:NV(50)");
-    }
-    ***/
-
-}
-
-
--- a/test/jdk/lambda/MethodReferenceTestSueCase1.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestSueCase1 {
-
-    public interface Sam2<T> { public String get(T target, String s); }
-
-    String instanceMethod(String s) { return "2"; }
-    Sam2<MethodReferenceTestSueCase1> var = MethodReferenceTestSueCase1::instanceMethod;
-
-    String m() {  return var.get(new MethodReferenceTestSueCase1(), ""); }
-
-    public void testSueCase1() {
-        assertEquals(m(), "2");
-    }
-}
\ No newline at end of file
--- a/test/jdk/lambda/MethodReferenceTestSueCase2.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestSueCase2 {
-
-    public interface Sam2<T> { public String get(T target, String s); }
-
-    String instanceMethod(String s) { return "2"; }
-    static Sam2<MethodReferenceTestSueCase2> var = MethodReferenceTestSueCase2::instanceMethod;
-
-    String m() {  return var.get(new MethodReferenceTestSueCase2(), ""); }
-
-    public void testSueCase2() {
-        assertEquals(m(), "2");
-    }
-
-}
\ No newline at end of file
--- a/test/jdk/lambda/MethodReferenceTestSueCase4.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestSueCase4 {
-
-    public interface Sam2<T> { public String get(T target, String s); }
-
-    Sam2<Target> var = new Object().equals(new Object()) ? Target::instanceMethod : Target::instanceMethod;
-
-    String m() {
-        return var.get(new Target(), "");
-    }
-
-    static class Target {
-        String instanceMethod(String s) { return "2"; }
-    }
-
-    public void testSueCase4() {
-        assertEquals(m(), "2");
-    }
-
-}
\ No newline at end of file
--- a/test/jdk/lambda/MethodReferenceTestSuper.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-
-
-/**
- * @author Robert Field
- */
-
-interface SPRI { String m(String a); }
-
-class SPRA {
-    String xsA__(String s) {
-        return "A__xsA:" + s;
-    }
-
-    String xsA_M(String s) {
-        return "A_MxsA:" + s;
-    }
-
-    String xsAB_(String s) {
-        return "AB_xsA:" + s;
-    }
-
-    String xsABM(String s) {
-        return "ABMxsA:" + s;
-    }
-
-}
-
-class SPRB extends SPRA {
-
-    String xsAB_(String s) {
-        return "AB_xsB:" + s;
-    }
-
-    String xsABM(String s) {
-        return "ABMxsB:" + s;
-    }
-
-    String xs_B_(String s) {
-        return "_B_xsB:" + s;
-    }
-
-    String xs_BM(String s) {
-        return "_BMxsB:" + s;
-    }
-
-}
-
-@Test
-public class MethodReferenceTestSuper extends SPRB {
-
-    String xsA_M(String s) {
-        return "A_MxsM:" + s;
-    }
-
-
-    String xsABM(String s) {
-        return "ABMxsM:" + s;
-    }
-
-    String xs_BM(String s) {
-        return "_BMxsM:" + s;
-    }
-
-    public void testMethodReferenceSuper() {
-        SPRI q;
-
-        q = super::xsA__;
-        assertEquals(q.m("*"), "A__xsA:*");
-
-        q = super::xsA_M;
-        assertEquals(q.m("*"), "A_MxsA:*");
-
-        q = super::xsAB_;
-        assertEquals(q.m("*"), "AB_xsB:*");
-
-        q = super::xsABM;
-        assertEquals(q.m("*"), "ABMxsB:*");
-
-        q = super::xs_B_;
-        assertEquals(q.m("*"), "_B_xsB:*");
-
-        q = super::xs_BM;
-        assertEquals(q.m("*"), "_BMxsB:*");
-    }
-
-}
--- a/test/jdk/lambda/MethodReferenceTestSuperDefault.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-
-/**
- * @author Robert Field
- */
-
-interface DSPRI { String m(String a); }
-
-interface DSPRA {
-    default String xsA__(String s) {
-        return "A__xsA:" + s;
-    }
-
-    default String xsAB_(String s) {
-        return "AB_xsA:" + s;
-    }
-
-}
-
-interface DSPRB extends DSPRA {
-
-    default String xsAB_(String s) {
-        return "AB_xsB:" + s;
-    }
-
-    default String xs_B_(String s) {
-        return "_B_xsB:" + s;
-    }
-
-}
-
-@Test
-public class MethodReferenceTestSuperDefault implements DSPRB {
-
-    public void testMethodReferenceSuper() {
-        DSPRI q;
-
-        q = DSPRB.super::xsA__;
-        assertEquals(q.m("*"), "A__xsA:*");
-
-        q = DSPRB.super::xsAB_;
-        assertEquals(q.m("*"), "AB_xsB:*");
-
-        q = DSPRB.super::xs_B_;
-        assertEquals(q.m("*"), "_B_xsB:*");
-    }
-
-}
--- a/test/jdk/lambda/MethodReferenceTestTypeConversion.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-class MethodReferenceTestTypeConversion_E<T> {
-    T xI(T t) { return t; }
-}
-
-@Test
-public class MethodReferenceTestTypeConversion {
-
-    interface ISi { int m(Short a); }
-
-    interface ICc { char m(Character a); }
-
-    public void testUnboxObjectToNumberWiden() {
-        ISi q = (new MethodReferenceTestTypeConversion_E<Short>())::xI;
-        assertEquals(q.m((short)77), (short)77);
-    }
-
-    public void testUnboxObjectToChar() {
-        ICc q = (new MethodReferenceTestTypeConversion_E<Character>())::xI;
-        assertEquals(q.m('@'), '@');
-    }
-
-}
--- a/test/jdk/lambda/MethodReferenceTestVarArgs.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-import java.lang.reflect.Array;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-@Test
-public class MethodReferenceTestVarArgs {
-
-    interface SII {
-
-        String m(Integer a, Integer b);
-    }
-
-    interface Siii {
-
-        String m(int a, int b, int c);
-    }
-
-    interface Si {
-
-        String m(int a);
-    }
-
-    interface SaO {
-
-        String m(Object[] a);
-    }
-
-    interface Sai {
-
-        String m(int[] a);
-    }
-
-    interface Svi {
-
-        String m(int... va);
-    }
-
-    // These should be processed as var args
-
-    static String xvI(Integer... vi) {
-        StringBuilder sb = new StringBuilder("xvI:");
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    static String xIvI(Integer f, Integer... vi) {
-        StringBuilder sb = new StringBuilder("xIvI:");
-        sb.append(f);
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    static String xvi(int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xvi:" + sum;
-    }
-
-    static String xIvi(Integer f, int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xIvi:(" + f + ")" + sum;
-    }
-
-    static String xvO(Object... vi) {
-        StringBuilder sb = new StringBuilder("xvO:");
-        for (Object i : vi) {
-            if (i.getClass().isArray()) {
-                sb.append("[");
-                int len = Array.getLength(i);
-                for (int x = 0; x < len; ++x)  {
-                    sb.append(Array.get(i, x));
-                    sb.append(",");
-                }
-                sb.append("]");
-
-            } else {
-                sb.append(i);
-            }
-            sb.append("*");
-        }
-        return sb.toString();
-    }
-
-    public void testVarArgsSuperclass() {
-        SII q;
-
-        q = MethodReferenceTestVarArgs::xvO;
-        assertEquals(q.m(55,66), "xvO:55*66*");
-    }
-
-    public void testVarArgsArray() {
-        Sai q;
-
-        q = MethodReferenceTestVarArgs::xvO;
-        assertEquals(q.m(new int[] { 55,66 } ), "xvO:[55,66,]*");
-    }
-
-    public void testVarArgsII() {
-        SII q;
-
-        q = MethodReferenceTestVarArgs::xvI;
-        assertEquals(q.m(33,7), "xvI:33-7-");
-
-        q = MethodReferenceTestVarArgs::xIvI;
-        assertEquals(q.m(50,40), "xIvI:5040-");
-
-        q = MethodReferenceTestVarArgs::xvi;
-        assertEquals(q.m(100,23), "xvi:123");
-
-        q = MethodReferenceTestVarArgs::xIvi;
-        assertEquals(q.m(9,21), "xIvi:(9)21");
-    }
-
-    public void testVarArgsiii() {
-        Siii q;
-
-        q = MethodReferenceTestVarArgs::xvI;
-        assertEquals(q.m(3, 2, 1), "xvI:3-2-1-");
-
-        q = MethodReferenceTestVarArgs::xIvI;
-        assertEquals(q.m(888, 99, 2), "xIvI:88899-2-");
-
-        q = MethodReferenceTestVarArgs::xvi;
-        assertEquals(q.m(900,80,7), "xvi:987");
-
-        q = MethodReferenceTestVarArgs::xIvi;
-        assertEquals(q.m(333,27, 72), "xIvi:(333)99");
-    }
-
-    public void testVarArgsi() {
-        Si q;
-
-        q = MethodReferenceTestVarArgs::xvI;
-        assertEquals(q.m(3), "xvI:3-");
-
-        q = MethodReferenceTestVarArgs::xIvI;
-        assertEquals(q.m(888), "xIvI:888");
-
-        q = MethodReferenceTestVarArgs::xvi;
-        assertEquals(q.m(900), "xvi:900");
-
-        q = MethodReferenceTestVarArgs::xIvi;
-        assertEquals(q.m(333), "xIvi:(333)0");
-    }
-
-    // These should NOT be processed as var args
-
-    public void testVarArgsaO() {
-        SaO q;
-
-        q = MethodReferenceTestVarArgs::xvO;
-        assertEquals(q.m(new String[] { "yo", "there", "dude" }), "xvO:yo*there*dude*");
-    }
-
-
-}
--- a/test/jdk/lambda/MethodReferenceTestVarArgsExt.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-import java.lang.reflect.Array;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-interface NXII { String m(Integer a, Integer b); }
-
-interface NXiii { String m(int a, int b, int c); }
-
-interface NXi { String m(int a); }
-
-interface NXaO { String m(Object[] a); }
-
-interface NXai { String m(int[] a); }
-
-interface NXvi { String m(int... va); }
-
-@Test
-public class MethodReferenceTestVarArgsExt {
-
-    // These should be processed as var args
-
-    public void testVarArgsNXSuperclass() {
-        NXII q;
-
-        q = (new Ext())::xvO;
-        assertEquals(q.m(55,66), "xvO:55*66*");
-    }
-
-    public void testVarArgsNXArray() {
-        NXai q;
-
-        q = (new Ext())::xvO;
-        assertEquals(q.m(new int[] { 55,66 } ), "xvO:[55,66,]*");
-    }
-
-    public void testVarArgsNXII() {
-        NXII q;
-
-        q = (new Ext())::xvI;
-        assertEquals(q.m(33,7), "xvI:33-7-");
-
-        q = (new Ext())::xIvI;
-        assertEquals(q.m(50,40), "xIvI:5040-");
-
-        q = (new Ext())::xvi;
-        assertEquals(q.m(100,23), "xvi:123");
-
-        q = (new Ext())::xIvi;
-        assertEquals(q.m(9,21), "xIvi:(9)21");
-    }
-
-    public void testVarArgsNXiii() {
-        NXiii q;
-
-        q = (new Ext())::xvI;
-        assertEquals(q.m(3, 2, 1), "xvI:3-2-1-");
-
-        q = (new Ext())::xIvI;
-        assertEquals(q.m(888, 99, 2), "xIvI:88899-2-");
-
-        q = (new Ext())::xvi;
-        assertEquals(q.m(900,80,7), "xvi:987");
-
-        q = (new Ext())::xIvi;
-        assertEquals(q.m(333,27, 72), "xIvi:(333)99");
-    }
-
-    public void testVarArgsNXi() {
-        NXi q;
-
-        q = (new Ext())::xvI;
-        assertEquals(q.m(3), "xvI:3-");
-
-        q = (new Ext())::xIvI;
-        assertEquals(q.m(888), "xIvI:888");
-
-        q = (new Ext())::xvi;
-        assertEquals(q.m(900), "xvi:900");
-
-        q = (new Ext())::xIvi;
-        assertEquals(q.m(333), "xIvi:(333)0");
-    }
-
-    // These should NOT be processed as var args
-
-    public void testVarArgsNXaO() {
-        NXaO q;
-
-        q = (new Ext())::xvO;
-        assertEquals(q.m(new String[] { "yo", "there", "dude" }), "xvO:yo*there*dude*");
-    }
-
-
-}
-
-class Ext {
-
-    String xvI(Integer... vi) {
-        StringBuilder sb = new StringBuilder("xvI:");
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    String xIvI(Integer f, Integer... vi) {
-        StringBuilder sb = new StringBuilder("xIvI:");
-        sb.append(f);
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    String xvi(int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xvi:" + sum;
-    }
-
-    String xIvi(Integer f, int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xIvi:(" + f + ")" + sum;
-    }
-
-    String xvO(Object... vi) {
-        StringBuilder sb = new StringBuilder("xvO:");
-        for (Object i : vi) {
-            if (i.getClass().isArray()) {
-                sb.append("[");
-                int len = Array.getLength(i);
-                for (int x = 0; x < len; ++x)  {
-                    sb.append(Array.get(i, x));
-                    sb.append(",");
-                }
-                sb.append("]");
-
-            } else {
-                sb.append(i);
-            }
-            sb.append("*");
-        }
-        return sb.toString();
-    }
-
-
-}
--- a/test/jdk/lambda/MethodReferenceTestVarArgsSuper.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-import java.lang.reflect.Array;
-
-import static org.testng.Assert.assertEquals;
-
-
-/**
- * @author Robert Field
- */
-
-class MethodReferenceTestVarArgsSuper_Sub {
-
-    String xvI(Integer... vi) {
-        StringBuilder sb = new StringBuilder("xvI:");
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    String xIvI(Integer f, Integer... vi) {
-        StringBuilder sb = new StringBuilder("xIvI:");
-        sb.append(f);
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    String xvi(int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xvi:" + sum;
-    }
-
-    String xIvi(Integer f, int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xIvi:(" + f + ")" + sum;
-    }
-
-    String xvO(Object... vi) {
-        StringBuilder sb = new StringBuilder("xvO:");
-        for (Object i : vi) {
-            if (i.getClass().isArray()) {
-                sb.append("[");
-                int len = Array.getLength(i);
-                for (int x = 0; x < len; ++x)  {
-                    sb.append(Array.get(i, x));
-                    sb.append(",");
-                }
-                sb.append("]");
-
-            } else {
-                sb.append(i);
-            }
-            sb.append("*");
-        }
-        return sb.toString();
-    }
-}
-
-@Test
-public class MethodReferenceTestVarArgsSuper extends MethodReferenceTestVarArgsSuper_Sub {
-
-    interface SPRII { String m(Integer a, Integer b); }
-
-    interface SPRiii { String m(int a, int b, int c); }
-
-    interface SPRi { String m(int a); }
-
-    interface SPRaO { String m(Object[] a); }
-
-    interface SPRai { String m(int[] a); }
-
-    interface SPRvi { String m(int... va); }
-
-    String xvI(Integer... vi) {
-        return "ERROR";
-    }
-
-    String xIvI(Integer f, Integer... vi) {
-        return "ERROR";
-    }
-
-    String xvi(int... vi) {
-        return "ERROR";
-    }
-
-    String xIvi(Integer f, int... vi) {
-        return "ERROR";
-   }
-
-    String xvO(Object... vi) {
-        return "ERROR";
-    }
-
-    // These should be processed as var args
-
-    public void testVarArgsSPRSuperclass() {
-        SPRII q;
-
-        q = super::xvO;
-        assertEquals(q.m(55,66), "xvO:55*66*");
-    }
-
-    public void testVarArgsSPRArray() {
-        SPRai q;
-
-        q = super::xvO;
-        assertEquals(q.m(new int[] { 55,66 } ), "xvO:[55,66,]*");
-    }
-
-    public void testVarArgsSPRII() {
-        SPRII q;
-
-        q = super::xvI;
-        assertEquals(q.m(33,7), "xvI:33-7-");
-
-        q = super::xIvI;
-        assertEquals(q.m(50,40), "xIvI:5040-");
-
-        q = super::xvi;
-        assertEquals(q.m(100,23), "xvi:123");
-
-        q = super::xIvi;
-        assertEquals(q.m(9,21), "xIvi:(9)21");
-    }
-
-    public void testVarArgsSPRiii() {
-        SPRiii q;
-
-        q = super::xvI;
-        assertEquals(q.m(3, 2, 1), "xvI:3-2-1-");
-
-        q = super::xIvI;
-        assertEquals(q.m(888, 99, 2), "xIvI:88899-2-");
-
-        q = super::xvi;
-        assertEquals(q.m(900,80,7), "xvi:987");
-
-        q = super::xIvi;
-        assertEquals(q.m(333,27, 72), "xIvi:(333)99");
-    }
-
-    public void testVarArgsSPRi() {
-        SPRi q;
-
-        q = super::xvI;
-        assertEquals(q.m(3), "xvI:3-");
-
-        q = super::xIvI;
-        assertEquals(q.m(888), "xIvI:888");
-
-        q = super::xvi;
-        assertEquals(q.m(900), "xvi:900");
-
-        q = super::xIvi;
-        assertEquals(q.m(333), "xIvi:(333)0");
-    }
-
-    // These should NOT be processed as var args
-
-    public void testVarArgsSPRaO() {
-        SPRaO q;
-
-        q = super::xvO;
-        assertEquals(q.m(new String[] { "yo", "there", "dude" }), "xvO:yo*there*dude*");
-    }
-}
-
--- a/test/jdk/lambda/MethodReferenceTestVarArgsSuperDefault.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-import java.lang.reflect.Array;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-interface MethodReferenceTestVarArgsSuperDefault_I {
-
-    default String xvI(Integer... vi) {
-        StringBuilder sb = new StringBuilder("xvI:");
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    default String xIvI(Integer f, Integer... vi) {
-        StringBuilder sb = new StringBuilder("xIvI:");
-        sb.append(f);
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    default String xvi(int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xvi:" + sum;
-    }
-
-    default String xIvi(Integer f, int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xIvi:(" + f + ")" + sum;
-    }
-
-    default String xvO(Object... vi) {
-        StringBuilder sb = new StringBuilder("xvO:");
-        for (Object i : vi) {
-            if (i.getClass().isArray()) {
-                sb.append("[");
-                int len = Array.getLength(i);
-                for (int x = 0; x < len; ++x)  {
-                    sb.append(Array.get(i, x));
-                    sb.append(",");
-                }
-                sb.append("]");
-
-            } else {
-                sb.append(i);
-            }
-            sb.append("*");
-        }
-        return sb.toString();
-    }
-}
-
-@Test
-public class MethodReferenceTestVarArgsSuperDefault implements MethodReferenceTestVarArgsSuperDefault_I {
-
-    interface DSPRII { String m(Integer a, Integer b); }
-
-    interface DSPRiii { String m(int a, int b, int c); }
-
-    interface DSPRi { String m(int a); }
-
-    interface DSPRaO { String m(Object[] a); }
-
-    interface DSPRai { String m(int[] a); }
-
-    interface DSPRvi { String m(int... va); }
-
-    // These should be processed as var args
-
-    public void testVarArgsSPRSuperclass() {
-        DSPRII q;
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvO;
-        assertEquals(q.m(55,66), "xvO:55*66*");
-    }
-
-    public void testVarArgsSPRArray() {
-        DSPRai q;
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvO;
-        assertEquals(q.m(new int[] { 55,66 } ), "xvO:[55,66,]*");
-    }
-
-    public void testVarArgsSPRII() {
-        DSPRII q;
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvI;
-        assertEquals(q.m(33,7), "xvI:33-7-");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xIvI;
-        assertEquals(q.m(50,40), "xIvI:5040-");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvi;
-        assertEquals(q.m(100,23), "xvi:123");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xIvi;
-        assertEquals(q.m(9,21), "xIvi:(9)21");
-    }
-
-    public void testVarArgsSPRiii() {
-        DSPRiii q;
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvI;
-        assertEquals(q.m(3, 2, 1), "xvI:3-2-1-");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xIvI;
-        assertEquals(q.m(888, 99, 2), "xIvI:88899-2-");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvi;
-        assertEquals(q.m(900,80,7), "xvi:987");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xIvi;
-        assertEquals(q.m(333,27, 72), "xIvi:(333)99");
-    }
-
-    public void testVarArgsSPRi() {
-        DSPRi q;
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvI;
-        assertEquals(q.m(3), "xvI:3-");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xIvI;
-        assertEquals(q.m(888), "xIvI:888");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvi;
-        assertEquals(q.m(900), "xvi:900");
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xIvi;
-        assertEquals(q.m(333), "xIvi:(333)0");
-    }
-
-    // These should NOT be processed as var args
-
-    public void testVarArgsSPRaO() {
-        DSPRaO q;
-
-        q = MethodReferenceTestVarArgsSuperDefault_I.super::xvO;
-        assertEquals(q.m(new String[] { "yo", "there", "dude" }), "xvO:yo*there*dude*");
-    }
-
-
-}
-
--- a/test/jdk/lambda/MethodReferenceTestVarArgsThis.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import org.testng.annotations.Test;
-import java.lang.reflect.Array;
-
-import static org.testng.Assert.assertEquals;
-
-/**
- * @author Robert Field
- */
-
-interface NsII { String m(Integer a, Integer b); }
-
-interface Nsiii { String m(int a, int b, int c); }
-
-interface Nsi { String m(int a); }
-
-interface NsaO { String m(Object[] a); }
-
-interface Nsai { String m(int[] a); }
-
-interface Nsvi { String m(int... va); }
-
-@Test
-public class MethodReferenceTestVarArgsThis {
-
-    // These should be processed as var args
-
-    String xvI(Integer... vi) {
-        StringBuilder sb = new StringBuilder("xvI:");
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    String xIvI(Integer f, Integer... vi) {
-        StringBuilder sb = new StringBuilder("xIvI:");
-        sb.append(f);
-        for (Integer i : vi) {
-            sb.append(i);
-            sb.append("-");
-        }
-        return sb.toString();
-    }
-
-    String xvi(int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xvi:" + sum;
-    }
-
-    String xIvi(Integer f, int... vi) {
-        int sum = 0;
-        for (int i : vi) {
-            sum += i;
-        }
-        return "xIvi:(" + f + ")" + sum;
-    }
-
-    String xvO(Object... vi) {
-        StringBuilder sb = new StringBuilder("xvO:");
-        for (Object i : vi) {
-            if (i.getClass().isArray()) {
-                sb.append("[");
-                int len = Array.getLength(i);
-                for (int x = 0; x < len; ++x)  {
-                    sb.append(Array.get(i, x));
-                    sb.append(",");
-                }
-                sb.append("]");
-
-            } else {
-                sb.append(i);
-            }
-            sb.append("*");
-        }
-        return sb.toString();
-    }
-
-    public void testVarArgsNsSuperclass() {
-        NsII q;
-
-        q = this::xvO;
-        assertEquals(q.m(55,66), "xvO:55*66*");
-    }
-
-    public void testVarArgsNsArray() {
-        Nsai q;
-
-        q = this::xvO;
-        assertEquals(q.m(new int[] { 55,66 } ), "xvO:[55,66,]*");
-    }
-
-    public void testVarArgsNsII() {
-        NsII q;
-
-        q = this::xvI;
-        assertEquals(q.m(33,7), "xvI:33-7-");
-
-        q = this::xIvI;
-        assertEquals(q.m(50,40), "xIvI:5040-");
-
-        q = this::xvi;
-        assertEquals(q.m(100,23), "xvi:123");
-
-        q = this::xIvi;
-        assertEquals(q.m(9,21), "xIvi:(9)21");
-    }
-
-    public void testVarArgsNsiii() {
-        Nsiii q;
-
-        q = this::xvI;
-        assertEquals(q.m(3, 2, 1), "xvI:3-2-1-");
-
-        q = this::xIvI;
-        assertEquals(q.m(888, 99, 2), "xIvI:88899-2-");
-
-        q = this::xvi;
-        assertEquals(q.m(900,80,7), "xvi:987");
-
-        q = this::xIvi;
-        assertEquals(q.m(333,27, 72), "xIvi:(333)99");
-    }
-
-    public void testVarArgsNsi() {
-        Nsi q;
-
-        q = this::xvI;
-        assertEquals(q.m(3), "xvI:3-");
-
-        q = this::xIvI;
-        assertEquals(q.m(888), "xIvI:888");
-
-        q = this::xvi;
-        assertEquals(q.m(900), "xvi:900");
-
-        q = this::xIvi;
-        assertEquals(q.m(333), "xIvi:(333)0");
-    }
-
-    // These should NOT be processed as var args
-
-    public void testVarArgsNsaO() {
-        NsaO q;
-
-        q = this::xvO;
-        assertEquals(q.m(new String[] { "yo", "there", "dude" }), "xvO:yo*there*dude*");
-    }
-
-
-}
--- a/test/jdk/lambda/shapegen/ClassCase.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,310 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- *
- * @author Robert Field
- */
-public class ClassCase {
-
-    public enum Kind {
-        IVAC        (true,  "v"),
-        IPRESENT    (true,  "p"),
-        IDEFAULT    (true,  "d"),
-        CNONE       (false, "n"),
-        CABSTRACT   (false, "a"),
-        CCONCRETE   (false, "c");
-
-        private final String prefix;
-        public final boolean isInterface;
-
-        Kind(boolean isInterface, String prefix) {
-            this.isInterface = isInterface;
-            this.prefix = prefix;
-        }
-
-        public String getPrefix() { return prefix; }
-    }
-
-    public final Kind kind;
-    private final ClassCase superclass;
-    private final List<ClassCase> supertypes;
-
-    private String name;
-    private boolean _OK;
-    private boolean _HasClassMethod;
-    private Set<ClassCase> _mprov;
-    private boolean _IsConcrete;
-    private boolean _HasDefault;
-    private ClassCase _mres;
-    private ClassCase _mdefend;
-
-    private Set<RuleGroup> executed = new HashSet<RuleGroup>();
-
-    public ClassCase(Kind kind, ClassCase superclass, List<ClassCase> interfaces) {
-        this.kind = kind;
-        this.superclass = superclass;
-
-        // Set supertypes from superclass (if any) and interfaces
-        List<ClassCase> lc;
-        if (superclass == null) {
-            lc = interfaces;
-        } else {
-            lc = new ArrayList<>();
-            lc.add(superclass);
-            lc.addAll(interfaces);
-        }
-        this.supertypes = lc;
-    }
-
-    public final boolean isInterface() { return kind.isInterface; }
-    public final boolean isClass() { return !kind.isInterface; }
-
-    public Set<ClassCase> get_mprov() {
-        exec(RuleGroup.PROVENENCE);
-        return _mprov;
-    }
-
-    public void set_mprov(ClassCase cc) {
-        Set<ClassCase> s = new HashSet<>();
-        s.add(cc);
-        _mprov = s;
-    }
-
-    public void set_mprov(Set<ClassCase> s) {
-        _mprov = s;
-    }
-
-    public ClassCase get_mres() {
-        exec(RuleGroup.RESOLUTION);
-        return _mres;
-    }
-
-    public void set_mres(ClassCase cc) {
-        _mres = cc;
-    }
-
-    public ClassCase get_mdefend() {
-        exec(RuleGroup.DEFENDER);
-        return _mdefend;
-    }
-
-    public void set_mdefend(ClassCase cc) {
-        _mdefend = cc;
-    }
-
-    public boolean get_HasClassMethod() {
-        exec(RuleGroup.PROVENENCE);
-        return _HasClassMethod;
-    }
-
-    public void set_HasClassMethod(boolean bool) {
-        _HasClassMethod = bool;
-    }
-
-    public boolean get_HasDefault() {
-        exec(RuleGroup.MARKER);
-        return _HasDefault;
-    }
-
-    public void set_HasDefault(boolean bool) {
-        _HasDefault = bool;
-    }
-
-    public boolean get_IsConcrete() {
-        exec(RuleGroup.MARKER);
-        return _IsConcrete;
-    }
-
-    public void set_IsConcrete(boolean bool) {
-        _IsConcrete = bool;
-    }
-
-    public boolean get_OK() {
-        exec(RuleGroup.CHECKING);
-        return _OK;
-    }
-
-    public void set_OK(boolean bool) {
-        _OK = bool;
-    }
-
-    public boolean isMethodDefined() {
-        for (ClassCase cc : supertypes) {
-            if (cc.isMethodDefined()) {
-                return true;
-            }
-        }
-        switch (kind) {
-            case CCONCRETE:
-            case CABSTRACT:
-            case IPRESENT:
-            case IDEFAULT:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    public boolean isAbstract() {
-        return isMethodDefined() && (get_mres()==null);
-    }
-
-    public boolean hasSuperclass() {
-        return superclass != null;
-    }
-
-    public ClassCase getSuperclass() {
-        return superclass;
-    }
-
-    public List<ClassCase> getSupertypes() {
-        return supertypes;
-    }
-
-    public List<ClassCase> getInterfaces() {
-        if (superclass != null) {
-            if (supertypes.get(0) != superclass) {
-                throw new AssertionError("superclass missing from supertypes");
-            }
-            return supertypes.subList(1, supertypes.size());
-        } else {
-            return supertypes;
-        }
-    }
-
-    public boolean isSubtypeOf(ClassCase cc) {
-        // S-Refl
-        if (cc.equals(this)) {
-            return true;
-        }
-
-        // S-Def
-        for (ClassCase sp : getSupertypes()) {
-            if (cc.equals(sp)) {
-                return true;
-            }
-        }
-
-        // _S-Trans
-        for (ClassCase sp : getSupertypes()) {
-            if (sp.isSubtypeOf(cc)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    public void init(Map<String, Integer> namingContext) {
-        if (name != null) {
-            return; // Already inited
-        }
-
-        for (ClassCase sup : supertypes) {
-            sup.init(namingContext);
-        }
-
-        // Build name
-        StringBuilder sb = new StringBuilder();
-        if (!supertypes.isEmpty()) {
-            sb.append(isInterface() ? "I" : "C");
-            for (ClassCase cc : supertypes) {
-                sb.append(cc.getName());
-            }
-            sb.append(kind.isInterface ? "i" : "c");
-        }
-        sb.append(kind.prefix);
-        String pname = sb.toString();
-        Integer icnt = namingContext.get(pname);
-        int cnt = icnt == null ? 0 : icnt;
-        ++cnt;
-        namingContext.put(pname, cnt);
-        if (cnt > 1) {
-            sb.append(cnt);
-        }
-        this.name = sb.toString();
-    }
-
-    public boolean isa(Kind... kinds) {
-        for (Kind k : kinds) {
-            if (kind == k) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void exec(RuleGroup rg ) {
-        if (!executed.contains(rg)) {
-            rg.exec(this);
-            executed.add(rg);
-        }
-    }
-
-    public void collectClasses(Set<ClassCase> seen) {
-        seen.add(this);
-        for (ClassCase cc : supertypes) {
-            cc.collectClasses(seen);
-        }
-    }
-
-    public String getID() {
-        if (name == null) {
-            throw new Error("Access to uninitialized ClassCase");
-        } else {
-            return name;
-        }
-    }
-
-    public final String getName() {
-        if (name == null) {
-            return "ClassCase uninited@" + hashCode();
-        } else {
-            return name;
-        }
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return obj instanceof ClassCase && getID().equals(((ClassCase)obj).getID());
-    }
-
-    @Override
-    public int hashCode() {
-        return getID().hashCode();
-    }
-
-    @Override
-    public String toString() {
-        return getName();
-    }
-}
--- a/test/jdk/lambda/shapegen/Hierarchy.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import static shapegen.ClassCase.Kind.*;
-
-/**
- *
- * @author Robert Field
- */
-public class Hierarchy {
-
-    public final ClassCase root;
-    public final Set<ClassCase> all;
-
-    public Hierarchy(ClassCase root) {
-        this.root = root;
-        root.init(new HashMap<String,Integer>());
-        Set<ClassCase> allClasses = new HashSet<>();
-        root.collectClasses(allClasses);
-        this.all = allClasses;
-    }
-
-    public boolean anyDefaults() {
-        for (ClassCase cc : all) {
-            if (cc.kind == IDEFAULT) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public boolean get_OK() {
-        return root.get_OK();
-    }
-
-    public String testName() {
-        return root + "Test";
-    }
-
-    private static void genInterfaceList(StringBuilder buf, String prefix, List<ClassCase> interfaces) {
-            if (!interfaces.isEmpty()) {
-                buf.append(" ");
-                buf.append(prefix);
-                buf.append(" ");
-                buf.append(interfaces.get(0));
-                for (int i = 1; i < interfaces.size(); ++i) {
-                    buf.append(", " + interfaces.get(i));
-                }
-            }
-    }
-
-    public static void genClassDef(StringBuilder buf, ClassCase cc, String implClass, List<ClassCase> defaultRef) {
-        if (cc.isInterface()) {
-            buf.append("interface ");
-            buf.append(cc.getName() + " ");
-            genInterfaceList(buf, "extends", cc.getInterfaces());
-            buf.append(" {\n");
-
-            switch (cc.kind) {
-                case IDEFAULT:
-                    buf.append("    default String m() { return \"\"; }\n");
-                    defaultRef.add(cc);
-                    break;
-                case IPRESENT:
-                    buf.append("    String m();\n");
-                    break;
-                case IVAC:
-                    break;
-                default:
-                    throw new AssertionError("Unexpected kind");
-            }
-            buf.append("}\n\n");
-        } else {
-            buf.append((cc.isAbstract()? "abstract " : ""));
-            buf.append(" class " + cc.getName());
-            if (cc.getSuperclass() != null) {
-                buf.append(" extends " + cc.getSuperclass());
-            }
-
-            genInterfaceList(buf, "implements", cc.getInterfaces());
-            buf.append(" {\n");
-
-            switch (cc.kind) {
-                case CCONCRETE:
-                    buf.append("   public String m() { return \"\"; }\n");
-                    break;
-                case CABSTRACT:
-                    buf.append("   public abstract String m();\n");
-                    break;
-                case CNONE:
-                    break;
-                default:
-                    throw new AssertionError("Unexpected kind");
-            }
-            buf.append("}\n\n");
-        }
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return obj instanceof Hierarchy && root.getID().equals(((Hierarchy)obj).root.getID());
-    }
-
-    @Override
-    public int hashCode() {
-        return root.getID().hashCode();
-    }
-
-    @Override
-    public String toString() {
-        return root.getName();
-    }
-
-    private static String classNames[] = {
-        "C", "D", "E", "F", "G", "H", "S", "T", "U", "V"
-    };
-
-    private static String interfaceNames[] = {
-        "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R"
-    };
-
-    private static int CLASS_INDEX = 0;
-    private static int INTERFACE_INDEX = 1;
-    private static int NUM_INDICIES = 2;
-
-    public List<String> getDescription() {
-        Map<ClassCase,String> nameMap = new HashMap<>();
-        assignNames(root, new int[NUM_INDICIES], nameMap);
-
-        ArrayList<String> res = new ArrayList<>();
-        if (root.getSupertypes().size() == 0) {
-           res.add(nameMap.get(root) + root.kind.getPrefix() + "()");
-        } else {
-            genCaseDescription(root, res, new HashSet<ClassCase>(), nameMap);
-        }
-        return res;
-    }
-
-    private static void assignNames(
-            ClassCase cc, int indices[], Map<ClassCase,String> names) {
-        String name = names.get(cc);
-        if (name == null) {
-            if (cc.isInterface()) {
-                names.put(cc, interfaceNames[indices[INTERFACE_INDEX]++]);
-            } else {
-                names.put(cc, classNames[indices[CLASS_INDEX]++]);
-            }
-            for (int i = 0; i < cc.getSupertypes().size(); ++i) {
-                assignNames(cc.getSupertypes().get(i), indices, names);
-            }
-        }
-    }
-
-    private static void genCaseDescription(
-            ClassCase cc, List<String> res, Set<ClassCase> alreadyDone,
-            Map<ClassCase,String> nameMap) {
-        if (!alreadyDone.contains(cc)) {
-            if (cc.getSupertypes().size() > 0) {
-                StringBuilder sb = new StringBuilder();
-                sb.append(nameMap.get(cc));
-                sb.append(cc.kind.getPrefix());
-                sb.append("(");
-                for (int i = 0; i < cc.getSupertypes().size(); ++i) {
-                    ClassCase supertype = cc.getSupertypes().get(i);
-                    if (i != 0) {
-                        sb.append(",");
-                    }
-                    genCaseDescription(supertype, res, alreadyDone, nameMap);
-                    sb.append(nameMap.get(supertype));
-                    sb.append(supertype.kind.getPrefix());
-                }
-                sb.append(")");
-                res.add(sb.toString());
-            }
-        }
-        alreadyDone.add(cc);
-    }
-}
--- a/test/jdk/lambda/shapegen/HierarchyGenerator.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-import shapegen.ClassCase.Kind;
-
-import java.util.Collection;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Collections;
-import java.util.ArrayList;
-import java.util.List;
-
-import static shapegen.ClassCase.Kind.*;
-
-import static java.lang.Math.pow;
-
-/**
- *
- * @author Robert Field
- */
-public final class HierarchyGenerator {
-
-    private int okcnt = 0;
-    private int errcnt = 0;
-    private Set<Hierarchy> uniqueOK = new HashSet<>();
-    private Set<Hierarchy> uniqueErr = new HashSet<>();
-
-    /**
-     * @param args the command line arguments
-     */
-    public HierarchyGenerator() {
-        organize("exhaustive interface", iExhaustive(2));
-        organize("exhaustive class", cExhaustive());
-        organize("shapes interface", iShapes());
-        organize("shapes class/interface", ciShapes());
-
-        System.out.printf("\nExpect OK:    %d -- unique %d",   okcnt,  uniqueOK.size());
-        System.out.printf("\nExpect Error: %d -- unique %d\n", errcnt, uniqueErr.size());
-    }
-
-    public Collection<Hierarchy> getOK() {
-        return uniqueOK;
-    }
-
-    public Collection<Hierarchy> getErr() {
-        return uniqueErr;
-    }
-
-    private void organize(String tname, List<Hierarchy> totest) {
-        System.out.printf("\nGenerating %s....\n", tname);
-        int nodefault = 0;
-        List<Hierarchy> ok = new ArrayList<>();
-        List<Hierarchy> err = new ArrayList<>();
-        for (Hierarchy cc : totest) {
-            if (cc.anyDefaults()) {
-                //System.out.printf("  %s\n", cc);
-                if (cc.get_OK()) {
-                    ok.add(cc);
-                } else {
-                    err.add(cc);
-                }
-            } else {
-                ++nodefault;
-            }
-        }
-
-        errcnt += err.size();
-        okcnt += ok.size();
-        uniqueErr.addAll(err);
-        uniqueOK.addAll(ok);
-
-        System.out.printf("  %5d No default\n  %5d Error\n  %5d OK\n  %5d Total\n",
-                nodefault, err.size(), ok.size(), totest.size());
-    }
-
-    public List<Hierarchy> iExhaustive(int idepth) {
-        List<ClassCase> current = new ArrayList<>();
-        for (int i = 0; i < idepth; ++i) {
-            current = ilayer(current);
-        }
-        return wrapInClassAndHierarchy(current);
-    }
-
-    private List<ClassCase> ilayer(List<ClassCase> srcLayer) {
-        List<ClassCase> lay = new ArrayList<>();
-        for (int i = (int) pow(2, srcLayer.size()) - 1; i >= 0; --i) {
-            List<ClassCase> itfs = new ArrayList<>();
-            for (int b = srcLayer.size() - 1; b >= 0; --b) {
-                if ((i & (1<<b)) != 0) {
-                    itfs.add(srcLayer.get(b));
-                }
-            }
-            lay.add(new ClassCase(IVAC, null, itfs));
-            lay.add(new ClassCase(IPRESENT, null, itfs));
-            lay.add(new ClassCase(IDEFAULT, null, itfs));
-            lay.add(new ClassCase(IDEFAULT, null, itfs));
-        }
-        return lay;
-    }
-
-    public List<Hierarchy> cExhaustive() {
-        final Kind[] iKinds = new Kind[]{IDEFAULT, IVAC, IPRESENT, null};
-        final Kind[] cKinds = new Kind[]{CNONE, CABSTRACT, CCONCRETE};
-        List<Hierarchy> totest = new ArrayList<>();
-        for (int i1 = 0; i1 < iKinds.length; ++i1) {
-            for (int i2 = 0; i2 < iKinds.length; ++i2) {
-                for (int i3 = 0; i3 < iKinds.length; ++i3) {
-                    for (int c1 = 0; c1 < cKinds.length; ++c1) {
-                        for (int c2 = 0; c2 < cKinds.length; ++c2) {
-                            for (int c3 = 0; c3 < cKinds.length; ++c3) {
-                                totest.add( new Hierarchy(
-                                        new ClassCase(cKinds[c1],
-                                            new ClassCase(cKinds[c2],
-                                                new ClassCase(cKinds[c3],
-                                                    null,
-                                                    iList(iKinds[i1])
-                                                ),
-                                                iList(iKinds[i2])
-                                            ),
-                                            iList(iKinds[i3])
-                                        )));
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return totest;
-    }
-
-    public static final List<ClassCase> EMPTY_LIST = new ArrayList<>();
-
-    private List<ClassCase> iList(Kind kind) {
-        if (kind == null) {
-            return EMPTY_LIST;
-        } else {
-            List<ClassCase> itfs = new ArrayList<>();
-            itfs.add(new ClassCase(kind, null, EMPTY_LIST));
-            return itfs;
-        }
-    }
-
-    public List<Hierarchy> ciShapes() {
-        return wrapInHierarchy(TTShape.allCases(true));
-    }
-
-    public List<Hierarchy> iShapes() {
-        return wrapInClassAndHierarchy(TTShape.allCases(false));
-    }
-
-    public List<Hierarchy> wrapInClassAndHierarchy(List<ClassCase> ihs) {
-        List<Hierarchy> totest = new ArrayList<>();
-        for (ClassCase cc : ihs) {
-            List<ClassCase> interfaces = new ArrayList<>();
-            interfaces.add(cc);
-            totest.add(new Hierarchy(new ClassCase(CNONE, null, interfaces)));
-        }
-        return totest;
-    }
-
-    public List<Hierarchy> wrapInHierarchy(List<ClassCase> ihs) {
-        List<Hierarchy> totest = new ArrayList<>();
-        for (ClassCase cc : ihs) {
-            totest.add(new Hierarchy(cc));
-        }
-        return totest;
-    }
-}
--- a/test/jdk/lambda/shapegen/Rule.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-/**
- *
- * @author Robert Field
- */
-public abstract class Rule {
-
-    public final String name;
-
-    public Rule(String name) {
-        this.name = name;
-    }
-
-    abstract boolean guard(ClassCase cc);
-
-    abstract void eval(ClassCase cc);
-
-    @Override
-    public String toString() {
-        return name;
-    }
-}
--- a/test/jdk/lambda/shapegen/RuleGroup.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import static shapegen.ClassCase.Kind.*;
-
-/**
- *
- * @author Robert Field
- */
-public class RuleGroup {
-
-    final String name;
-    private final Rule[] rules;
-
-    public RuleGroup(String name, Rule[] rules) {
-        this.name = name;
-        this.rules = rules;
-    }
-
-    public boolean exec(ClassCase cc) {
-        boolean found = false;
-        for (Rule rule : rules) {
-            if (rule.guard(cc)) {
-                if (found) {
-                    throw new RuntimeException("Bad rules -- multiple matches " + toString() + " for " + cc);
-                } else {
-                    rule.eval(cc);
-                    found = true;
-                }
-            }
-        }
-        return found;
-    }
-
-    @Override
-    public String toString() {
-        return name;
-    }
-
-    public static RuleGroup PROVENENCE = new RuleGroup("Provenence", new Rule[] {
-      new Rule("P-CDeclare") {
-          boolean guard(ClassCase cc) {
-              return cc.isa(CCONCRETE, CABSTRACT);
-          }
-
-          void eval(ClassCase cc) {
-              cc.set_mprov(cc);
-              cc.set_HasClassMethod(true);
-          }
-      },
-
-      new Rule("P-IDeclare") {
-          boolean guard(ClassCase cc) {
-              return cc.isa(IDEFAULT, IPRESENT);
-          }
-
-          void eval(ClassCase cc) {
-              cc.set_mprov(cc);
-          }
-      },
-
-      new Rule("P-IntfInh") {
-          boolean guard(ClassCase cc) {
-              return cc.isa(IVAC, CNONE) && !(cc.hasSuperclass() && cc.getSuperclass().get_HasClassMethod());
-          }
-
-          void eval(ClassCase cc) {
-              Set<ClassCase> _S = new HashSet<>();
-              for (ClassCase t : cc.getSupertypes()) {
-                  _S.addAll(t.get_mprov());
-              }
-              Set<ClassCase> tops = new HashSet<>();
-              for (ClassCase _W : _S) {
-                  for (ClassCase _V : _S) {
-                      if (_V.equals(_W) || !(_V.isSubtypeOf(_W))) {
-                          tops.add(_W);
-                      }
-                  }
-              }
-              cc.set_mprov(tops);
-          }
-      },
-
-      new Rule("P-ClassInh") {
-          boolean guard(ClassCase cc) {
-              return cc.isa(CNONE) && (cc.hasSuperclass() && cc.getSuperclass().get_HasClassMethod());
-          }
-
-          void eval(ClassCase cc) {
-              cc.set_mprov(cc.getSuperclass());
-              cc.set_HasClassMethod(true);
-          }
-      },
-
-    });
-
-    public static RuleGroup MARKER = new RuleGroup("Marker", new Rule[] {
-      new Rule("M-Default") {
-          boolean guard(ClassCase cc) {
-              return cc.isa(IDEFAULT);
-          }
-
-          void eval(ClassCase cc) {
-              cc.set_HasDefault(true);
-          }
-      },
-
-      new Rule("M-Conc") {
-          boolean guard(ClassCase cc) {
-            return cc.isa(CCONCRETE);
-          }
-
-          void eval(ClassCase cc) {
-              cc.set_IsConcrete(true);
-          }
-      },
-
-    });
-
-    public static RuleGroup RESOLUTION = new RuleGroup("Resolution", new Rule[] {
-      new Rule("R-Resolve") {
-          boolean guard(ClassCase cc) {
-              if (!(cc.isClass() && cc.get_mprov().size() == 1)) {
-                  return false;
-              }
-              ClassCase _V = cc.get_mprov().iterator().next();
-              return _V.get_IsConcrete() || _V.get_HasDefault();
-          }
-
-          void eval(ClassCase cc) {
-              ClassCase _V = cc.get_mprov().iterator().next();
-              cc.set_mres(_V);
-          }
-      },
-
-    });
-
-    public static RuleGroup DEFENDER = new RuleGroup("Defender", new Rule[] {
-      new Rule("D-Defend") {
-          boolean guard(ClassCase cc) {
-              ClassCase mresSuper = cc.hasSuperclass() ? cc.getSuperclass().get_mres() : null;
-              boolean eq = cc.get_mres() == null ? mresSuper == null : cc.get_mres().equals(mresSuper);
-              return cc.isa(CNONE) && !eq;
-          }
-
-          void eval(ClassCase cc) {
-              cc.set_mdefend(cc.get_mres());
-          }
-      },
-
-    });
-
-    public static RuleGroup CHECKING = new RuleGroup("Checking", new Rule[] {
-      new Rule("C-Check") {
-          boolean guard(ClassCase cc) {
-              for (ClassCase t : cc.getSupertypes()) {
-                  if (! t.get_OK()) {
-                      return false;
-                  }
-              }
-              int defenderCount = 0;
-              int provCount = 0;
-              for (ClassCase prov : cc.get_mprov()) {
-                  if (prov.get_HasDefault()) {
-                      defenderCount++;
-                  }
-                  provCount++;
-              }
-              return provCount <= 1 || defenderCount == 0;
-          }
-
-          void eval(ClassCase cc) {
-              cc.set_OK(true);
-          }
-      },
-
-    });
-
-}
--- a/test/jdk/lambda/shapegen/TTNode.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-import shapegen.ClassCase.Kind;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import static shapegen.ClassCase.Kind.*;
-
-/**
- * Type Template Node
- *
- * @author Robert Field
- */
-public class TTNode {
-
-    final List<TTNode> supertypes;
-    final boolean canBeClass;
-
-    private int currentKindIndex;
-    private Kind[] kinds;
-
-    public TTNode(List<TTNode> subtypes, boolean canBeClass) {
-        this.supertypes = subtypes;
-        this.canBeClass = canBeClass;
-    }
-
-    public void start(boolean includeClasses) {
-        kinds =
-             supertypes.isEmpty()?
-                (new Kind[]{IDEFAULT, IPRESENT})
-             :  ((includeClasses && canBeClass)?
-                  new Kind[]{CNONE, IVAC, IDEFAULT, IPRESENT}
-                : new Kind[]{IVAC, IDEFAULT, IPRESENT});
-        currentKindIndex = 0;
-
-        for (TTNode sub : supertypes) {
-            sub.start(includeClasses);
-        }
-    }
-
-    public boolean next() {
-        ++currentKindIndex;
-        if (currentKindIndex >= kinds.length) {
-            currentKindIndex = 0;
-            return false;
-        } else {
-            return true;
-        }
-    }
-
-    public void collectAllSubtypes(Set<TTNode> subs) {
-        subs.add(this);
-        for (TTNode n : supertypes) {
-            n.collectAllSubtypes(subs);
-        }
-    }
-
-    private Kind getKind() {
-        return kinds[currentKindIndex];
-    }
-
-    boolean isInterface() {
-        return getKind().isInterface;
-    }
-
-    boolean isClass() {
-        return !isInterface();
-    }
-
-    boolean hasDefault() {
-        return getKind() == IDEFAULT;
-    }
-
-    public boolean isValid() {
-        for (TTNode n : supertypes) {
-            if (!n.isValid() || (isInterface() && n.isClass())) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public ClassCase genCase() {
-        ClassCase subclass;
-        List<TTNode> ttintfs;
-        if (isClass() && !supertypes.isEmpty() && supertypes.get(0).isClass()) {
-            subclass = supertypes.get(0).genCase();
-            ttintfs = supertypes.subList(1, supertypes.size());
-        } else {
-            subclass = null;
-            ttintfs = supertypes;
-        }
-        List<ClassCase> intfs = new ArrayList<>();
-        for (TTNode node : ttintfs) {
-            intfs.add(node.genCase());
-        }
-        return new ClassCase(getKind(), subclass, intfs);
-    }
-}
--- a/test/jdk/lambda/shapegen/TTParser.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.StringReader;
-
-import static java.lang.Character.isLetter;
-import static java.lang.Character.isUpperCase;
-import static java.lang.Character.isWhitespace;
-
-/**
- * Parse a type template definition string
- *
- *   input     :: classDef
- *   classDef  :: letter [ ( classDef* ) ]
- *
- * @author Robert Field
- */
-public class TTParser extends StringReader {
-
-    private Map<Character, TTNode> letterMap = new HashMap<>();
-    private char ch;
-
-    private final String def;
-
-    public TTParser(String s) {
-        super(s);
-        this.def = s;
-    }
-
-    private void advance() throws IOException {
-        do {
-            ch = (char)read();
-        } while (isWhitespace(ch));
-    }
-
-    public TTNode parse() {
-        try {
-            advance();
-            return classDef();
-        } catch (IOException t) {
-            throw new RuntimeException(t);
-        }
-    }
-
-    private TTNode classDef() throws IOException {
-        if (!isLetter(ch)) {
-            if (ch == (char)-1) {
-                throw new IOException("Unexpected end of type template in " + def);
-            } else {
-                throw new IOException("Unexpected character in type template: " + (Character)ch + " in " + def);
-            }
-        }
-        char nodeCh = ch;
-        TTNode node = letterMap.get(nodeCh);
-        boolean canBeClass = isUpperCase(nodeCh);
-        advance();
-        if (node == null) {
-            List<TTNode> subtypes = new ArrayList<>();
-            if (ch == '(') {
-                advance();
-                while (ch != ')') {
-                    subtypes.add(classDef());
-                }
-                advance();
-            }
-            node = new TTNode(subtypes, canBeClass);
-            letterMap.put(nodeCh, node);
-        }
-        return node;
-    }
-}
--- a/test/jdk/lambda/shapegen/TTShape.java	Mon Apr 06 19:09:18 2015 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package shapegen;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- *
- * @author Robert Field
- */
-public class TTShape {
-
-    private final TTNode root;
-    private final TTNode[] nodes;
-
-    TTShape(TTNode root) {
-        this.root = root;
-        Set<TTNode> subs = new HashSet<>();
-        root.collectAllSubtypes(subs);
-        nodes = subs.toArray(new TTNode[subs.size()]);
-    }
-
-    private List<ClassCase> toCases(boolean includeClasses) {
-        List<ClassCase> ccs = new ArrayList<>();
-        root.start(includeClasses);
-        int i;
-        outer:
-        while (true) {
-            if (root.isValid()) {
-                ClassCase cc = root.genCase();
-                //System.out.println(cc);
-                ccs.add(cc);
-            }
-
-            i = 0;
-            do {
-                if (i >= nodes.length) {
-                    break outer;
-                }
-            } while(!nodes[i++].next());
-        }
-        return ccs;
-    }
-
-   public static List<ClassCase> allCases(boolean includeClasses) {
-        List<ClassCase> ccs = new ArrayList<>();
-        for (TTShape shape : SHAPES) {
-            ccs.addAll(shape.toCases(includeClasses));
-        }
-        return ccs;
-    }
-
-    public static TTShape parse(String s) {
-        return new TTShape(new TTParser(s).parse());
-    }
-
-    public static final TTShape[] SHAPES = new TTShape[] {
-        parse("a"),
-        parse("a(b)"),
-        parse("A(bb)"),
-        parse("A(B(d)c(d))"),
-        parse("A(b(c))"),
-        parse("A(B(cd)d)"),
-        parse("A(B(c)c)"),
-        parse("A(B(Ce)d(e))"),
-        parse("A(B(C)d(e))"),
-        parse("A(Bc(d))"),
-        parse("A(B(d)dc)"),
-        parse("A(B(dc)dc)"),
-        parse("A(B(c(d))d)"),
-        parse("A(B(C(d))d)"),
-        parse("A(B(C(e)d(e))e)"),
-        parse("A(B(c(d))c)"),
-        parse("A(B(dc(d))c)"),
-        parse("A(B(C(d))d)"),
-    };
-
-}