< prev index next >
src/java.base/share/classes/jdk/internal/module/ModulePatcher.java
Print this page
*** 147,159 ****
descriptor = JLMA.newModuleDescriptor(descriptor, packages);
}
// return a module reference to the patched module
URI location = mref.location().orElse(null);
! return JLMA.newPatchedModule(descriptor,
location,
! () -> new PatchedModuleReader(paths, mref));
}
/**
* Returns true is this module patcher has no patches.
--- 147,169 ----
descriptor = JLMA.newModuleDescriptor(descriptor, packages);
}
// return a module reference to the patched module
URI location = mref.location().orElse(null);
!
! ModuleResolution mres = null;
! if (mref instanceof ModuleReferenceImpl) {
! mres = ((ModuleReferenceImpl)mref).moduleResolution();
! }
!
! return new ModuleReferenceImpl(descriptor,
location,
! () -> new PatchedModuleReader(paths, mref),
! this,
! null,
! null,
! mres);
}
/**
* Returns true is this module patcher has no patches.
< prev index next >