jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java
changeset 15261 c5b882836677
parent 13795 73850c397272
child 15526 84de8685a2d0
equal deleted inserted replaced
15260:7af2d7a87806 15261:c5b882836677
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   140             // There are only old classfiles in this segment or resources
   140             // There are only old classfiles in this segment or resources
   141             packageVersion = JAVA5_PACKAGE_VERSION;
   141             packageVersion = JAVA5_PACKAGE_VERSION;
   142         } else if (highV.equals(JAVA6_MAX_CLASS_VERSION) ||
   142         } else if (highV.equals(JAVA6_MAX_CLASS_VERSION) ||
   143                 (highV.equals(JAVA7_MAX_CLASS_VERSION) && !pkg.cp.haveExtraTags())) {
   143                 (highV.equals(JAVA7_MAX_CLASS_VERSION) && !pkg.cp.haveExtraTags())) {
   144             // force down the package version if we have jdk7 classes without
   144             // force down the package version if we have jdk7 classes without
   145             // any Indy references, this is because jdk7 class file (52.0) without
   145             // any Indy references, this is because jdk7 class file (51.0) without
   146             // Indy is identical to jdk6 class file (51.0).
   146             // Indy is identical to jdk6 class file (50.0).
   147             packageVersion = JAVA6_PACKAGE_VERSION;
   147             packageVersion = JAVA6_PACKAGE_VERSION;
       
   148         } else if (highV.equals(JAVA7_MAX_CLASS_VERSION)) {
       
   149             packageVersion = JAVA7_PACKAGE_VERSION;
   148         } else {
   150         } else {
   149             // Normal case.  Use the newest archive format, when available
   151             // Normal case.  Use the newest archive format, when available
   150             packageVersion = JAVA7_PACKAGE_VERSION;
   152             packageVersion = JAVA8_PACKAGE_VERSION;
   151         }
   153         }
   152 
   154 
   153         if (verbose > 0) {
   155         if (verbose > 0) {
   154             Utils.log.info("Highest version class file: " + highV
   156             Utils.log.info("Highest version class file: " + highV
   155                     + " package version: " + packageVersion);
   157                     + " package version: " + packageVersion);