-
Notifications
You must be signed in to change notification settings - Fork 127
8368475: [lworld] Add preview classes to jimage at make time #1622
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
Closed
david-beaumont
wants to merge
10
commits into
openjdk:lworld
from
david-beaumont:jdk_8368475_makefile
+2,463
−1,572
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9d7f5f3
jimage writer changes to support preview mode.
david-beaumont e84e7a8
Remove TODOs now jimage version is bumped
david-beaumont eb2752a
add system property guard to preview mode
david-beaumont f29bdbe
Restoring lost changes and updating some comments.
david-beaumont 09ca4c6
new tests for ImageLocation
david-beaumont b566ea1
[[AUTOMATIC FORMATTING]]
david-beaumont bde94b6
feedback and remove unused code
david-beaumont dbd78c3
Fixing up after dependent PR changes
david-beaumont c1f4189
fixing tests after refactoring
david-beaumont b32d27c
Roll up of makefile and test fix (temporary)
david-beaumont File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/java.base/share/classes/jdk/internal/jimage/ResourceEntries.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| package jdk.internal.jimage; | ||
|
|
||
| import java.io.InputStream; | ||
| import java.util.stream.Stream; | ||
|
|
||
| /** | ||
| * Accesses the underlying resource entries in a jimage file. | ||
| * | ||
| * <p>This API is designed only for use by the jlink classes, which manipulate | ||
| * jimage files directly. For inspection of runtime resources, it is vital that | ||
| * {@code previewMode} is correctly observed, making this API unsuitable. | ||
| * | ||
| * <p>This API ignores the {@code previewMode} of the {@link ImageReader} from | ||
| * which it is obtained, and returns an unmapped view of entries (e.g. allowing | ||
| * for direct access of resources in the {@code META-INF/preview/...} namespace). | ||
| * | ||
| * <p>It disallows access to resource directories (i.e. {@code "/modules/..."} | ||
| * or packages (i.e. {@code "/packages/..."}. | ||
| */ | ||
| public interface ResourceEntries { | ||
| /** | ||
| * Returns the full entry names for all resources in the given module, in | ||
| * random order. Entry names will always be prefixed by the given module | ||
| * name (e.g. "/<module-name/..."). | ||
| */ | ||
| Stream<String> entryNamesIn(String module); | ||
|
|
||
| /** | ||
| * Returns the (uncompressed) size of a resource given its full entry name. | ||
| * | ||
| * @throws java.util.NoSuchElementException if the resource does not exist. | ||
| */ | ||
| long sizeOf(String name); | ||
|
|
||
| /** | ||
| * Returns an {@link InputStream} for a resource given its full entry name. | ||
| * | ||
| * @throws java.util.NoSuchElementException if the resource does not exist. | ||
| */ | ||
| InputStream open(String name); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect build reviewer will suggest using the SetupCopyFiles mechanism to copy files.