changeset 57056:b5b82a715cae nestmates

[nestmates] fix incorrect assert in defineHiddenClass
author mchung
date Tue, 17 Sep 2019 22:25:39 -0700
parents e25fcad6a2f1
children e6d1c222ae07
files src/java.base/share/classes/java/lang/invoke/MethodHandles.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Mon Sep 16 17:42:41 2019 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Tue Sep 17 22:25:39 2019 -0700
@@ -1881,7 +1881,7 @@
              */
             void validateNestHost() {
                 Class<?> nestHost = JLA.nestHost(lookupClass, true);
-                assert nestHost != null && nestHost != lookupClass;
+                assert nestHost == null || nestHost == lookupClass;
             }
 
             Class<?> defineClass(boolean initialize, Object classData) {