< prev index next >

test/lib/testlibrary/java/util/jar/CreateMultiReleaseTestJars.java

Print this page
rev 16859 : 8176709: JarFileSystem::isMultiReleaseJar is incorrect
Reviewed-by: alanb, sherman, psandoz, mchung

*** 107,119 **** --- 107,127 ---- return jb; } public void buildCustomMultiReleaseJar(String filename, String multiReleaseValue, Map<String, String> extraAttributes) throws IOException { + buildCustomMultiReleaseJar(filename, multiReleaseValue, extraAttributes, false); + } + + public void buildCustomMultiReleaseJar(String filename, String multiReleaseValue, + Map<String, String> extraAttributes, boolean addEntries) throws IOException { JarBuilder jb = new JarBuilder(filename); extraAttributes.entrySet() .forEach(entry -> jb.addAttribute(entry.getKey(), entry.getValue())); + if (addEntries) { + addEntries(jb); + } jb.addAttribute("Multi-Release", multiReleaseValue); jb.build(); } private void addEntries(JarBuilder jb) {
< prev index next >