changeset 48763:64231bbc1346 nestmates

8193408: [Nestmates] Update Class.getNestMembers to allow for duplicates Reviewed-by: mcimadamore
author dholmes
date Mon, 29 Jan 2018 23:38:28 -0500
parents 23544ad7e842
children e95006f30c9d
files src/java.base/share/classes/java/lang/Class.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Class.java	Wed Jan 24 23:14:32 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Class.java	Mon Jan 29 23:38:28 2018 -0500
@@ -3904,8 +3904,15 @@
      * of its nest. The nest host will always be the zeroeth element.
      *
      * <p>Each listed nest member must be validated by checking its own
-     * declared {@linkplain #getNestHost() nest host}. Any exceptions that occur
-     * as part of this process will be thrown.
+     * declared nest host. Any exceptions that occur as part of this process
+     * will be thrown.
+     *
+     * <p>The list of nest members in the classfile is permitted to
+     * contain duplicates, or to explicitly include the nest host. It is not
+     * required that an implementation of this method removes these duplicates.
+     *
+     * @implNote This implementation does not remove duplicate nest members if they
+     * are present.
      *
      * @return an array of all classes and interfaces in the same nest as
      * this class