Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open modules export all packages just like unnamed modules #1995

Merged
merged 1 commit into from
May 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions runtime/util/modularityHelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ isAllowedReadAccessToModule(J9VMThread *currentThread, J9Module *fromModule, J9M
BOOLEAN canRead = FALSE;
if ((fromModule == toModule) /* modules are the same, no need to check */
|| (toModule == vm->javaBaseModule) /* java.base is implicitly read by every module, no need to check */
|| (J9_IS_J9MODULE_UNNAMED(vm, fromModule)) /* unamed Modules can read all other modules */
|| (J9_IS_J9MODULE_UNNAMED(vm, fromModule)) /* unnamed Modules can read all other modules */
) {
canRead = TRUE;
} else if (isModuleDefined(currentThread, fromModule)) {
Expand Down Expand Up @@ -247,8 +247,8 @@ isPackageExportedToModuleHelper(J9VMThread *currentThread, J9Module *fromModule,
J9JavaVM *vm = currentThread->javaVM;
BOOLEAN isExported = FALSE;

if (J9_IS_J9MODULE_UNNAMED(vm, fromModule)) {
/* unnamed modules export all packages */
if (J9_IS_J9MODULE_UNNAMED(vm, fromModule) || J9_IS_J9MODULE_OPEN(fromModule)) {
/* unnamed & open modules export all packages */
isExported = TRUE;
} else if (NULL != j9package) {
/* First try the general export rules */
Expand Down