--- old/src/java.base/share/classes/jdk/internal/reflect/Reflection.java 2018-05-25 01:36:11.909283073 -0400 +++ new/src/java.base/share/classes/jdk/internal/reflect/Reflection.java 2018-05-25 01:36:10.417196939 -0400 @@ -145,7 +145,6 @@ // Check for nestmate access if member is private if (Modifier.isPrivate(modifiers)) { - // assert: isSubclassof(targetClass, memberClass) // Note: targetClass may be outside the nest, but that is okay // as long as memberClass is in the nest. if (areNestMates(currentClass, memberClass)) { --- old/test/jdk/java/lang/reflect/Nestmates/SampleNest.java 2018-05-25 01:36:18.793680521 -0400 +++ new/test/jdk/java/lang/reflect/Nestmates/SampleNest.java 2018-05-25 01:36:17.265592286 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -30,7 +30,7 @@ // recursively gather all the named nested types - static List> _nestedTypes = new LinkedList>(); + static List> _nestedTypes = new LinkedList<>(); static void gather(Class c) { _nestedTypes.add(c); --- old/test/jdk/java/lang/reflect/Nestmates/TestReflectionAPI.java 2018-05-25 01:36:25.582072497 -0400 +++ new/test/jdk/java/lang/reflect/Nestmates/TestReflectionAPI.java 2018-05-25 01:36:24.057984491 -0400 @@ -261,8 +261,7 @@ else { // get rid of duplicates Class[] memberSet = - new HashSet>(Arrays.asList(members)).toArray(new Class[0]); - Arrays.sort(memberSet, cmp); + Arrays.stream(members).sorted(cmp).distinct().toArray(Class[]::new); if (!Arrays.equals(memberSet, nestedTypes)) { throw new Error("Class " + host.getName() + " has different members " + "compared to declared classes, even after duplicate removal"); --- old/test/jdk/java/lang/invoke/PrivateInterfaceCall.java 2018-05-25 01:36:32.370464472 -0400 +++ new/test/jdk/java/lang/invoke/PrivateInterfaceCall.java 2018-05-25 01:36:30.842376237 -0400 @@ -23,7 +23,7 @@ /** * @test - * @bug 8010319 + * @bug 8046171 * @summary Test direct and MethodHandle access to private interface methods using invokeinterface semantics * to ensure all receiver typechecks occur as required. * @comment This complements SpecialInterfaceCall which tests invokespecial semantics.