src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -140,16 +140,18 @@
// There are only old classfiles in this segment or resources
packageVersion = JAVA5_PACKAGE_VERSION;
} else if (highV.equals(JAVA6_MAX_CLASS_VERSION) ||
(highV.equals(JAVA7_MAX_CLASS_VERSION) && !pkg.cp.haveExtraTags())) {
// force down the package version if we have jdk7 classes without
- // any Indy references, this is because jdk7 class file (52.0) without
- // Indy is identical to jdk6 class file (51.0).
+ // any Indy references, this is because jdk7 class file (51.0) without
+ // Indy is identical to jdk6 class file (50.0).
packageVersion = JAVA6_PACKAGE_VERSION;
+ } else if (highV.equals(JAVA7_MAX_CLASS_VERSION)) {
+ packageVersion = JAVA7_PACKAGE_VERSION;
} else {
// Normal case. Use the newest archive format, when available
- packageVersion = JAVA7_PACKAGE_VERSION;
+ packageVersion = JAVA8_PACKAGE_VERSION;
}
if (verbose > 0) {
Utils.log.info("Highest version class file: " + highV
+ " package version: " + packageVersion);