< prev index next >
jdk/src/java.base/share/classes/java/util/jar/JarFile.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 151,161 ****
static {
// Set up JavaUtilJarAccess in SharedSecrets
SharedSecrets.setJavaUtilJarAccess(new JavaUtilJarAccessImpl());
BASE_VERSION = 8; // one less than lowest version for versioned entries
! int runtimeVersion = jdk.Version.current().major();
String jarVersion =
GetPropertyAction.privilegedGetProperty("jdk.util.jar.version");
if (jarVersion != null) {
int jarVer = Integer.parseInt(jarVersion);
runtimeVersion = (jarVer > runtimeVersion)
--- 151,161 ----
static {
// Set up JavaUtilJarAccess in SharedSecrets
SharedSecrets.setJavaUtilJarAccess(new JavaUtilJarAccessImpl());
BASE_VERSION = 8; // one less than lowest version for versioned entries
! int runtimeVersion = Runtime.version().major();
String jarVersion =
GetPropertyAction.privilegedGetProperty("jdk.util.jar.version");
if (jarVersion != null) {
int jarVer = Integer.parseInt(jarVersion);
runtimeVersion = (jarVer > runtimeVersion)
*** 355,365 ****
assert runtimeVersionExists();
}
private boolean runtimeVersionExists() {
! int version = jdk.Version.current().major();
try {
Release.valueOf(version);
return true;
} catch (IllegalArgumentException x) {
System.err.println("No JarFile.Release object for release " + version);
--- 355,365 ----
assert runtimeVersionExists();
}
private boolean runtimeVersionExists() {
! int version = Runtime.version().major();
try {
Release.valueOf(version);
return true;
} catch (IllegalArgumentException x) {
System.err.println("No JarFile.Release object for release " + version);
< prev index next >