--- old/src/share/vm/runtime/reflection.cpp 2017-03-23 14:05:18.398148197 -0400 +++ new/src/share/vm/runtime/reflection.cpp 2017-03-23 14:05:17.882148175 -0400 @@ -464,8 +464,9 @@ Caller S in package If MS is loose: YES If same classloader/package (PS == PT): YES PS, runtime module MS If MS can read T's If same runtime module: (MS == MT): YES unnamed module: YES - Else if (MS can read MT (Establish readability) && - MT exports PT to MS or to all modules): YES + Else if (MS can read MT (establish readability) && + ((MT exports PT to MS or to all modules) || + (MT is open))): YES ------------------------------------------------------------------------------------------------ Caller S in unnamed YES Readability exists because unnamed module @@ -518,7 +519,7 @@ return ACCESS_OK; } - // Acceptable access to a type in an unamed module. Note that since + // Acceptable access to a type in an unnamed module. Note that since // unnamed modules can read all unnamed modules, this also handles the // case where module_from is also unnamed but in a different class loader. if (!module_to->is_named() && @@ -531,6 +532,11 @@ return MODULE_NOT_READABLE; } + // Access is allowed if module_to is open, i.e. all its packages are unqualifiedly exported + if (module_to->is_open()) { + return ACCESS_OK; + } + PackageEntry* package_to = new_class->package(); assert(package_to != NULL, "can not obtain new_class' package");