< prev index next > src/java.base/share/classes/sun/invoke/util/VerifyAccess.java
Print this page
// 1. refc is in different module from lookupModule, or
// 2. refc is in lookupModule and a different module from prevLookupModule
Module prevLookupModule = prevLookupClass != null ? prevLookupClass.getModule()
: null;
assert refModule != lookupModule || refModule != prevLookupModule;
+
if (isModuleAccessible(refc, lookupModule, prevLookupModule))
return true;
// public class not accessible to lookupClass
return false;
< prev index next >