Skip to content
Prev Previous commit
Next Next commit
[[AUTOMATIC FORMATTING]]
  • Loading branch information
david-beaumont committed Nov 3, 2025
commit b566ea14940a45be4ebd4c1de49a4b97479bddd2
30 changes: 15 additions & 15 deletions src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,21 @@ public static int getFlags(String name, Predicate<String> hasEntry) {
}
}

/**
* Helper function to calculate package flags for {@code "/packages/xxx"}
* directory entries.
*
* <p>Based on the module references, the flags are:
* <ul>
* <li>{@code FLAGS_HAS_PREVIEW_VERSION} if <em>any</em> referenced
* package has a preview version.
* <li>{@code FLAGS_IS_PREVIEW_ONLY} if <em>all</em> referenced packages
* are preview only.
* </ul>
*
* @return package flags for {@code "/packages/xxx"} directory entries.
*/
public static int getPackageFlags(List<ModuleReference> moduleReferences) {
/**
* Helper function to calculate package flags for {@code "/packages/xxx"}
* directory entries.
*
* <p>Based on the module references, the flags are:
* <ul>
* <li>{@code FLAGS_HAS_PREVIEW_VERSION} if <em>any</em> referenced
* package has a preview version.
* <li>{@code FLAGS_IS_PREVIEW_ONLY} if <em>all</em> referenced packages
* are preview only.
* </ul>
*
* @return package flags for {@code "/packages/xxx"} directory entries.
*/
public static int getPackageFlags(List<ModuleReference> moduleReferences) {
boolean hasPreviewVersion =
moduleReferences.stream().anyMatch(ModuleReference::hasPreviewVersion);
boolean isPreviewOnly =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public boolean isPreviewModeEnabled() {
default:
throw new IllegalStateException("Invalid mode: " + this);
}
};
}
;

// Temporary system property to disable preview patching and enable the new preview mode
// feature for testing/development. Once the preview mode feature is finished, the value
Expand Down