< prev index next >
src/java.base/share/classes/java/util/jar/JarFile.java
Print this page
rev 15485 : 8156499: Update jlink to support creating images with modules that are packaged as multi-release JARs
Reviewed-by:
Contributed-by: steve.drach@oracle.com
*** 351,361 ****
*/
public final boolean isMultiRelease() {
if (isMultiRelease) {
return true;
}
! if (MULTI_RELEASE_ENABLED && versionMajor != BASE_VERSION_MAJOR) {
try {
checkForSpecialAttributes();
} catch (IOException io) {
isMultiRelease = false;
}
--- 351,361 ----
*/
public final boolean isMultiRelease() {
if (isMultiRelease) {
return true;
}
! if (MULTI_RELEASE_ENABLED) {
try {
checkForSpecialAttributes();
} catch (IOException io) {
isMultiRelease = false;
}
*** 958,968 ****
if (manEntry != null) {
byte[] b = getBytes(manEntry);
hasClassPathAttribute = match(CLASSPATH_CHARS, b,
CLASSPATH_LASTOCC) != -1;
// is this a multi-release jar file
! if (MULTI_RELEASE_ENABLED && versionMajor != BASE_VERSION_MAJOR) {
int i = match(MULTIRELEASE_CHARS, b, MULTIRELEASE_LASTOCC);
if (i != -1) {
i += MULTIRELEASE_CHARS.length;
if (i < b.length) {
byte c = b[i++];
--- 958,968 ----
if (manEntry != null) {
byte[] b = getBytes(manEntry);
hasClassPathAttribute = match(CLASSPATH_CHARS, b,
CLASSPATH_LASTOCC) != -1;
// is this a multi-release jar file
! if (MULTI_RELEASE_ENABLED) {
int i = match(MULTIRELEASE_CHARS, b, MULTIRELEASE_LASTOCC);
if (i != -1) {
i += MULTIRELEASE_CHARS.length;
if (i < b.length) {
byte c = b[i++];
< prev index next >