As part of supporting preview mode throughout the JDK, the Java ImageReader class needs to be able to load alternate versions of classes and resources from a jimage file.
The changes submitted as part of this task will be to provide the new logic in the Java classes, but not supply preview resources (this will come later).
So initially this code will have no visible effect, and should behave identically to the existing version of the code.
This will follow the same layout as for other preview aware code interrogating the jimage file, so specifically:
1. Preview resources will exist per module.
2. Preview resources for /modules/<module>/<path> will be in /modules/<module>/META-INF/preview/<path>
3. When preview mode is enabled, preview resources will overlay non-preview resources (by path matching).
4. Entries in the /packages/xxx namespace will also be affected by the existence of new entries in preview mode.
5. (IMPORTANT) Non preview resources, will still be returned EVEN IF they were originally related to replaced resource (e.g. nested/inner class defined by a non-preview class, but no longer defined by the preview version).
The changes submitted as part of this task will be to provide the new logic in the Java classes, but not supply preview resources (this will come later).
So initially this code will have no visible effect, and should behave identically to the existing version of the code.
This will follow the same layout as for other preview aware code interrogating the jimage file, so specifically:
1. Preview resources will exist per module.
2. Preview resources for /modules/<module>/<path> will be in /modules/<module>/META-INF/preview/<path>
3. When preview mode is enabled, preview resources will overlay non-preview resources (by path matching).
4. Entries in the /packages/xxx namespace will also be affected by the existence of new entries in preview mode.
5. (IMPORTANT) Non preview resources, will still be returned EVEN IF they were originally related to replaced resource (e.g. nested/inner class defined by a non-preview class, but no longer defined by the preview version).
- links to
-
Review(pr/1618) openjdk/valhalla/1619