jdk/test/lib/testlibrary/java/util/jar/CreateMultiReleaseTestJars.java
changeset 40814 f105fad88cb6
parent 40812 dc3755b63ade
child 44257 3220d2ac3cee
equal deleted inserted replaced
40813:dd5aa9c67561 40814:f105fad88cb6
    88     }
    88     }
    89 
    89 
    90     public void buildMultiReleaseJar() throws IOException {
    90     public void buildMultiReleaseJar() throws IOException {
    91         JarBuilder jb = customMultiReleaseJar("multi-release.jar", "true");
    91         JarBuilder jb = customMultiReleaseJar("multi-release.jar", "true");
    92         addEntries(jb);
    92         addEntries(jb);
       
    93         jb.addEntry("META-INF/versions/9/version/Version.class", version9Classes.get("version.Version"));
       
    94         jb.build();
       
    95     }
       
    96 
       
    97     public void buildShortMultiReleaseJar() throws IOException {
       
    98         JarBuilder jb = customMultiReleaseJar("short-multi-release.jar", "true");
       
    99         addEntries(jb);
    93         jb.build();
   100         jb.build();
    94     }
   101     }
    95 
   102 
    96     private JarBuilder customMultiReleaseJar(String filename, String multiReleaseValue)
   103     private JarBuilder customMultiReleaseJar(String filename, String multiReleaseValue)
    97             throws IOException {
   104             throws IOException {
   116         jb.addEntry("version/Version.java", java8.getBytes());
   123         jb.addEntry("version/Version.java", java8.getBytes());
   117         jb.addEntry("version/Version.class", rootClasses.get("version.Version"));
   124         jb.addEntry("version/Version.class", rootClasses.get("version.Version"));
   118         jb.addEntry("META-INF/versions/9/README", readme9.getBytes());
   125         jb.addEntry("META-INF/versions/9/README", readme9.getBytes());
   119         jb.addEntry("META-INF/versions/9/version/Version.java", java9.getBytes());
   126         jb.addEntry("META-INF/versions/9/version/Version.java", java9.getBytes());
   120         jb.addEntry("META-INF/versions/9/version/PackagePrivate.java", ppjava9.getBytes());
   127         jb.addEntry("META-INF/versions/9/version/PackagePrivate.java", ppjava9.getBytes());
   121         jb.addEntry("META-INF/versions/9/version/Version.class", version9Classes.get("version.Version"));
       
   122         jb.addEntry("META-INF/versions/9/version/PackagePrivate.class", version9Classes.get("version.PackagePrivate"));
   128         jb.addEntry("META-INF/versions/9/version/PackagePrivate.class", version9Classes.get("version.PackagePrivate"));
   123         jb.addEntry("META-INF/versions/10/README", readme10.getBytes());
   129         jb.addEntry("META-INF/versions/10/README", readme10.getBytes());
   124         jb.addEntry("META-INF/versions/10/version/Version.java", java10.getBytes());
   130         jb.addEntry("META-INF/versions/10/version/Version.java", java10.getBytes());
   125         jb.addEntry("META-INF/versions/10/version/Version.class", version10Classes.get("version.Version"));
   131         jb.addEntry("META-INF/versions/10/version/Version.class", version10Classes.get("version.Version"));
   126     }
   132     }