From 15d8e30e9b0fc9c0fee83516b0daecdc92bcc180 Mon Sep 17 00:00:00 2001 From: Niels Basjes Date: Sun, 5 Nov 2023 17:56:22 +0100 Subject: [PATCH 1/4] feat: Support Multi Release Jars (JEP-238) --- pom.xml | 6 + .../java/org/vafer/jdependency/Clazz.java | 113 +++++++++++++- .../java/org/vafer/jdependency/Clazzpath.java | 38 +++-- .../org/vafer/jdependency/ClazzpathUnit.java | 5 + .../jdependency/ClazzpathUnitTestCase.java | 116 ++++++++++++-- src/test/resources-src/README.md | 3 + src/test/resources-src/multi-jdk/pom.xml | 141 ++++++++++++++++++ .../maven/multijdk/AbstractJavaVersion.java | 32 ++++ .../java/nl/basjes/maven/multijdk/App.java | 22 +++ .../nl/basjes/maven/multijdk/JavaVersion.java | 26 ++++ .../java/nl/basjes/maven/multijdk/Main.java | 26 ++++ .../java/nl/basjes/maven/multijdk/Unused.java | 22 +++ .../java11/nl/basjes/maven/multijdk/App.java | 22 +++ .../nl/basjes/maven/multijdk/JavaVersion.java | 33 ++++ .../maven/multijdk/OnlyUsedInJava17.java | 22 +++ .../maven/multijdk/SpecificToJava11.java | 22 +++ .../nl/basjes/maven/multijdk/Unused.java | 22 +++ .../java17/nl/basjes/maven/multijdk/App.java | 22 +++ .../maven/multijdk/SpecificToJava17.java | 22 +++ .../nl/basjes/maven/multijdk/Unused.java | 21 +++ src/test/resources-src/pom.xml | 29 ++++ src/test/resources-src/uses-multi-jdk/pom.xml | 89 +++++++++++ .../src/main/java/nl/example/Main.java | 27 ++++ src/test/resources/multi-jdk-1.0.0.jar | Bin 0 -> 11956 bytes src/test/resources/uses-multi-jdk-1.0.jar | Bin 0 -> 2995 bytes 25 files changed, 855 insertions(+), 26 deletions(-) create mode 100644 src/test/resources-src/README.md create mode 100644 src/test/resources-src/multi-jdk/pom.xml create mode 100644 src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/AbstractJavaVersion.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/App.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/JavaVersion.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Main.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Unused.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/App.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/JavaVersion.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/OnlyUsedInJava17.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/SpecificToJava11.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/Unused.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/App.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/SpecificToJava17.java create mode 100644 src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/Unused.java create mode 100644 src/test/resources-src/pom.xml create mode 100644 src/test/resources-src/uses-multi-jdk/pom.xml create mode 100644 src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java create mode 100644 src/test/resources/multi-jdk-1.0.0.jar create mode 100644 src/test/resources/uses-multi-jdk-1.0.jar diff --git a/pom.xml b/pom.xml index fab3358d..e0922ab4 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,12 @@ krosenvold@apache.org + + + Niels Basjes + nielsbasjes@apache.org + + scm:git:git@github.com:tcurdt/jdependency.git scm:git:git@github.com:tcurdt/jdependency.git diff --git a/src/main/java/org/vafer/jdependency/Clazz.java b/src/main/java/org/vafer/jdependency/Clazz.java index 69a0931b..cbc5a42b 100644 --- a/src/main/java/org/vafer/jdependency/Clazz.java +++ b/src/main/java/org/vafer/jdependency/Clazz.java @@ -19,6 +19,10 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.apache.commons.io.FilenameUtils.separatorsToUnix; /** * A `Clazz` represents the single class identifier inside a classpath. @@ -32,16 +36,123 @@ public final class Clazz implements Comparable { private final Set references = new HashSet<>(); private final Map units = new HashMap<>(); + public static final class ClazzFile { + private ClazzpathUnit unit; + private String filename; + + public ClazzFile(ClazzpathUnit unit, String filename) { + this.unit = unit; + this.filename = filename; + } + + public ClazzpathUnit getUnit() { + return unit; + } + + public String getFilename() { + return filename; + } + + @Override + public String toString() { + return "ClazzFile{" + + "unit=" + unit + + ", filename='" + filename + '\'' + + '}'; + } + } + + // Usually a class is only in a single file. + // When using MultiRelease Jar files this can be multiple files, one for each java release specified. + // The default filename is under the key "8". + private final Map classFilenames = new HashMap<>(); + + // The name of the class (like "org.vafer.jdependency.Clazz") private final String name; public Clazz( final String pName ) { name = pName; } + private static final Pattern EXTRACT_MULTI_RELEASE_JAVA_VERSION = Pattern.compile("^(?:META-INF[\\/\\\\]versions[\\/\\\\](\\d+)[\\/\\\\])?([^.]+).class$"); + + public static final class ParsedFileName { + public String className; + public String forJava; + + @Override + public String toString() { + return "ParsedFileName{" + + "className='" + className + '\'' + + ", forJava='" + forJava + '\'' + + '}'; + } + } + + /** + * Determine the class name for the provided filename. + * + * @param pFileName The filename + * @return the class name for the provided filename OR null if it is not a .class file. + */ + public static ParsedFileName parseClassFileName(String pFileName) { + if (pFileName == null || !pFileName.endsWith(".class")) { + return null;// Not a class filename + } + // foo/bar/Foo.class -> // foo.bar.Foo + + Matcher matcher = EXTRACT_MULTI_RELEASE_JAVA_VERSION.matcher(pFileName); + if (!matcher.matches()) { + return null; + } + ParsedFileName result = new ParsedFileName(); + result.forJava = matcher.group(1); + result.className = separatorsToUnix(matcher.group(2)).replace('/', '.'); + + if (result.forJava == null || result.forJava.isEmpty()) { + if (result.className.contains("-")) { + return null; + } + result.forJava = "8"; + } + + return result; + } + + /** + * Determine if the provided filename is the name of a class that is specific for a java version. + * @param pFileName The filename to be evaluated + * @return true if this is a filename for a specific java version, false if it is not + */ + public static boolean isMultiReleaseClassFile(String pFileName) { + if (pFileName == null) { + return false; + } + Matcher matcher = EXTRACT_MULTI_RELEASE_JAVA_VERSION.matcher(pFileName); + if (!matcher.matches()) { + return false; + } + return matcher.group(1) != null && !matcher.group(1).isEmpty(); + } + + /** + * Record that this class name can be found at: + * @param pUnit The unit in which the class can be found + * @param pForJava For which Java version + * @param pFileName Under which filename in the jar. + */ + public void addMultiReleaseFile(ClazzpathUnit pUnit, String pForJava, String pFileName) { + classFilenames.put(pForJava, new ClazzFile(pUnit, pFileName)); + } + public String getName() { return name; } + public Map getFileNames() { + return classFilenames; + } + public void addClazzpathUnit( final ClazzpathUnit pUnit, final String pDigest ) { units.put(pUnit, pDigest); } @@ -116,7 +227,7 @@ public int compareTo( final Clazz pO ) { } public String toString() { - return name; + return name + " in " + classFilenames; } } diff --git a/src/main/java/org/vafer/jdependency/Clazzpath.java b/src/main/java/org/vafer/jdependency/Clazzpath.java index 12440256..c7776be3 100644 --- a/src/main/java/org/vafer/jdependency/Clazzpath.java +++ b/src/main/java/org/vafer/jdependency/Clazzpath.java @@ -23,17 +23,21 @@ import java.util.Map; import java.util.Set; import java.util.Base64; +import java.util.TreeMap; import java.util.jar.JarInputStream; import java.nio.file.Files; import java.nio.file.Path; import java.security.MessageDigest; +import org.apache.commons.io.input.MessageDigestInputStream; import org.objectweb.asm.ClassReader; -import org.apache.commons.io.input.MessageDigestCalculatingInputStream; import static org.apache.commons.io.FilenameUtils.normalize; import static org.apache.commons.io.FilenameUtils.separatorsToUnix; +import org.vafer.jdependency.Clazz.ParsedFileName; import org.vafer.jdependency.asm.DependenciesClassAdapter; + +import static org.vafer.jdependency.Clazz.parseClassFileName; import static org.vafer.jdependency.utils.StreamUtils.asStream; @@ -46,20 +50,16 @@ public final class Clazzpath { private final boolean versions; private abstract static class Resource { + public final String fileName; + public final String forJava; + public final String name; // Class name ! - private static final int ext = ".class".length(); - - public final String name; - - Resource( final String pName ) { + Resource( final String pFileName ) { super(); - - final int all = pName.length(); - - // foo/bar/Foo.class -> // foo.bar.Foo - this.name = separatorsToUnix(pName) - .substring(0, all - ext) - .replace('/', '.'); + this.fileName = pFileName; + ParsedFileName parsedFileName = parseClassFileName(pFileName); + forJava = parsedFileName.forJava; + name = parsedFileName.className; } abstract InputStream getInputStream() throws IOException; @@ -68,7 +68,7 @@ private abstract static class Resource { private static boolean isValidResourceName( final String pName ) { return pName != null && pName.endsWith(".class") - && !pName.contains( "-" ); + && ( !pName.contains( "-" ) || pName.contains("META-INF/versions/") ); } public Clazzpath() { @@ -86,7 +86,7 @@ public boolean removeClazzpathUnit( final ClazzpathUnit pUnit ) { for (Clazz clazz : unitClazzes) { clazz.removeClazzpathUnit(pUnit); if (clazz.getClazzpathUnits().size() == 0) { - clazzes.remove(clazz.toString()); + clazzes.remove(clazz.getName()); } } @@ -168,7 +168,8 @@ private ClazzpathUnit addClazzpathUnit( final Iterable resources, fina InputStream inputStream = resource.getInputStream(); try { final MessageDigest digest = MessageDigest.getInstance("SHA-256"); - final MessageDigestCalculatingInputStream calculatingInputStream = new MessageDigestCalculatingInputStream(inputStream, digest); + final MessageDigestInputStream calculatingInputStream = + MessageDigestInputStream.builder().setInputStream(inputStream).setMessageDigest(digest).get(); if (versions) { inputStream = calculatingInputStream; @@ -190,6 +191,7 @@ private ClazzpathUnit addClazzpathUnit( final Iterable resources, fina clazz = new Clazz(clazzName); } } + clazz.addMultiReleaseFile(unit, resource.forJava, resource.fileName); final String d = Base64.getEncoder().encodeToString(digest.digest()); clazz.addClazzpathUnit(unit, d); @@ -243,6 +245,10 @@ public Set getClazzes() { return new HashSet<>(clazzes.values()); } + public Map getClazzesMap() { + return new TreeMap<>(clazzes); + } + public Set getClashedClazzes() { final Set all = new HashSet<>(); for (Clazz clazz : clazzes.values()) { diff --git a/src/main/java/org/vafer/jdependency/ClazzpathUnit.java b/src/main/java/org/vafer/jdependency/ClazzpathUnit.java index 0ba835db..7f2d6dac 100644 --- a/src/main/java/org/vafer/jdependency/ClazzpathUnit.java +++ b/src/main/java/org/vafer/jdependency/ClazzpathUnit.java @@ -18,6 +18,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.TreeMap; public final class ClazzpathUnit { @@ -36,6 +37,10 @@ public Set getClazzes() { return new HashSet<>(clazzes.values()); } + public Map getClazzesMap() { + return new TreeMap<>(clazzes); + } + public Clazz getClazz( final String pClazzName ) { return clazzes.get(pClazzName); } diff --git a/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java b/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java index a105035e..a9afda9b 100644 --- a/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java +++ b/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java @@ -19,24 +19,40 @@ import java.io.File; import java.io.IOException; +import java.net.URL; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.HashSet; +import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; - +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; +import static org.vafer.jdependency.Clazz.parseClassFileName; public class ClazzpathUnitTestCase { private static Path resourcePath( String filename ) { - return Paths.get(filename); + ClassLoader classLoader = ClazzpathUnitTestCase.class.getClassLoader(); + URL resource = classLoader.getResource(filename); + if (resource == null) { + return null; + } + return Paths.get(resource.getFile()); } private static File resourceFile( String filename ) { - return Paths.get(filename).toFile(); + ClassLoader classLoader = ClazzpathUnitTestCase.class.getClassLoader(); + URL resource = classLoader.getResource(filename); + if (resource == null) { + return null; + } + return new File(resource.getFile()); } @Test @@ -69,10 +85,8 @@ public void testIssue47() throws IOException { .flatMap( i -> i.getClazzpathUnits().stream() ) .map( i -> i.toString() ) .collect(Collectors.toSet()); - final Set unitse = new HashSet(Arrays.asList( - "woodstox-core-6.2.3.jar" - )); - assertEquals(unitse, units); + assertEquals(1, units.size()); + assertTrue(units.iterator().next().endsWith("woodstox-core-6.2.3.jar")); } @Test @@ -153,13 +167,13 @@ public void testShouldHaveUnitId() throws IOException { final Clazzpath cp = new Clazzpath(); final ClazzpathUnit u1 = cp.addClazzpathUnit(resourceFile("jar1.jar")); - assertEquals(u1.toString(), "jar1.jar"); + assertTrue(u1.toString().endsWith("jar1.jar")); final ClazzpathUnit u1e = cp.addClazzpathUnit(resourceFile("jar1.jar"), "jar1"); assertEquals(u1e.toString(), "jar1"); final ClazzpathUnit u2 = cp.addClazzpathUnit(resourcePath("jar2.jar")); - assertEquals(u2.toString(), "jar2.jar"); + assertTrue(u2.toString().endsWith("jar2.jar")); final ClazzpathUnit u2e = cp.addClazzpathUnit(resourcePath("jar2.jar"), "jar2"); assertEquals(u2e.toString(), "jar2"); @@ -179,4 +193,88 @@ public void testDependencies() throws IOException { } + + private void verifyFileNameParsing(String fileName, String forJava, String className) { + Clazz.ParsedFileName result = parseClassFileName(fileName); + assertEquals(className, result.className); + assertEquals(forJava, result.forJava); + } + + private void verifyFileNameParsingInvalid(String fileName) { + assertNull(parseClassFileName(fileName)); + } + + @Test + public void testFileNameCheck(){ + assertFalse(Clazz.isMultiReleaseClassFile("nl/basjes/maven/multijdk/App.class")); + assertTrue(Clazz.isMultiReleaseClassFile("META-INF/versions/11/nl/basjes/maven/multijdk/App.class")); + assertTrue(Clazz.isMultiReleaseClassFile("META-INF/versions/1234/nl/basjes/maven/multijdk/App.class")); + } + + @Test + public void testFileNameParsing(){ + verifyFileNameParsing("nl/basjes/maven/multijdk/App.class", "8", "nl.basjes.maven.multijdk.App"); + verifyFileNameParsing("META-INF/versions/11/nl/basjes/maven/multijdk/App.class", "11", "nl.basjes.maven.multijdk.App"); + verifyFileNameParsing("META-INF/versions/1234/nl/basjes/maven/multijdk/App.class", "1234", "nl.basjes.maven.multijdk.App"); + + verifyFileNameParsingInvalid("nl/basjes/maven/multijdk/App.classsssss"); + verifyFileNameParsingInvalid("nl/basjes/maven/multijdk/App.txt"); + verifyFileNameParsingInvalid("META-INF/versions/xxx/nl/basjes/maven/multijdk/App.class"); + } + + private void verifyFileInClazz(Clazz clazz, String expectedFilename, String forJava, boolean mustBePresent) { + Clazz.ClazzFile actualClazzFile = clazz.getFileNames().get(forJava); + String actualFileName = actualClazzFile == null ? null : actualClazzFile.getFilename(); + if (mustBePresent) { + assertEquals("Incorrect filename for Java "+forJava, expectedFilename, actualFileName); + } else { + assertNull("Unexpected filename for Java "+forJava, actualFileName); + } + } + + private void verifyClazzFiles(Clazz clazz, boolean have8, boolean have11, boolean have17) { + String expectedFilename = clazz.getName().replace(".", "/")+".class"; + verifyFileInClazz(clazz, expectedFilename, "8", have8); + verifyFileInClazz(clazz, "META-INF/versions/11/" + expectedFilename, "11", have11); + verifyFileInClazz(clazz, "META-INF/versions/17/" + expectedFilename, "17", have17); + } + + @Test + public void testMultiReleaseJar() throws IOException { + final Clazzpath cp = new Clazzpath(); + + // The Application + final ClazzpathUnit app = cp.addClazzpathUnit(resourceFile("uses-multi-jdk-1.0.jar")); + Map appClazzes = app.getClazzesMap(); + + assertEquals(1, appClazzes.size()); + verifyClazzFiles(appClazzes.get("nl.example.Main"), true, false, false); + + // The multi release dependency + final ClazzpathUnit dependency = cp.addClazzpathUnit(resourceFile("multi-jdk-1.0.0.jar")); + Map dependencyClazzes = dependency.getClazzesMap(); + // Java 8, Java 11, Java 17 + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.Main"), true, false, false); + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.App"), true, true, true); + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.AbstractJavaVersion"), true, false, false); + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.JavaVersion"), true, true, false); + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.Unused"), true, true, true); + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.OnlyUsedInJava17"), false, true, false); + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.SpecificToJava11"), false, true, false); + verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.SpecificToJava17"), false, false, true); + + // Check which are obsolete + final Set removable = cp.getClazzes(); + removable.removeAll(appClazzes.values()); + removable.removeAll(app.getTransitiveDependencies()); + + Map removableClazzes = removable + .stream() + .collect(Collectors.toMap(Clazz::getName, Function.identity())); + + assertEquals(2, removableClazzes.size()); + assertTrue(removableClazzes.containsKey("nl.basjes.maven.multijdk.Main")); + assertTrue(removableClazzes.containsKey("nl.basjes.maven.multijdk.Unused")); + } + } diff --git a/src/test/resources-src/README.md b/src/test/resources-src/README.md new file mode 100644 index 00000000..eca7f939 --- /dev/null +++ b/src/test/resources-src/README.md @@ -0,0 +1,3 @@ +These are the sources for some of the jar files used during testing. + +To recreate the jars specified in this subdirectory simply do `mvn clean install` and they will be copied to the `test/resources` directory. \ No newline at end of file diff --git a/src/test/resources-src/multi-jdk/pom.xml b/src/test/resources-src/multi-jdk/pom.xml new file mode 100644 index 00000000..00ca4b2e --- /dev/null +++ b/src/test/resources-src/multi-jdk/pom.xml @@ -0,0 +1,141 @@ + + + + + + 4.0.0 + + Multi Release Jar + + nl.basjes.maven + multi-jdk + 1.0.0 + + + UTF-8 + UTF-8 + + + 2023-11-11T12:34:56Z + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + java-11 + + compile + + + 11 + 11 + 11 + ${project.basedir}/src/main/java11 + true + + + + + java-17 + + compile + + + 17 + 17 + 17 + ${project.basedir}/src/main/java17 + true + + + + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + nl.basjes.maven.multijdk.Main + + + true + + + + + + + + + maven-resources-plugin + 3.3.1 + + + Install jar into resources directory + install + + copy-resources + + + + + target + + ${project.artifactId}-${project.version}.jar + + + + ${project.basedir}/../../resources/ + + + + + + + org.apache.maven.plugins + maven-artifact-plugin + 3.5.0 + + + Ensure reproducible + install + + compare + + + + + + + + diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/AbstractJavaVersion.java b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/AbstractJavaVersion.java new file mode 100644 index 00000000..1343829b --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/AbstractJavaVersion.java @@ -0,0 +1,32 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public abstract class AbstractJavaVersion { + + public abstract String getCodeVersion(); + public abstract String getJavaVersion(); + + public String getJavaMajorVersion() { + String version = getJavaVersion(); + String[] versionElements = version.split("\\."); + String majorVersion = versionElements[0]; + if ("1".equals(majorVersion)) { + majorVersion = versionElements[1]; + } + return majorVersion; + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/App.java b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/App.java new file mode 100644 index 00000000..c53bfce4 --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/App.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class App { + public String doSomething() { + return "base"; + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/JavaVersion.java b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/JavaVersion.java new file mode 100644 index 00000000..3b2a6661 --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/JavaVersion.java @@ -0,0 +1,26 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class JavaVersion extends AbstractJavaVersion { + public String getCodeVersion() { + return "8"; + } + + public String getJavaVersion() { + return System.getProperty("java.version"); + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Main.java b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Main.java new file mode 100644 index 00000000..09804a43 --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Main.java @@ -0,0 +1,26 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class Main { + public static void main(String[] args) { + JavaVersion javaVersion = new JavaVersion(); + System.out.println("Java detect: " + javaVersion.getCodeVersion()); + System.out.println("Java major : " + javaVersion.getJavaMajorVersion()); + System.out.println("App code : " + new App().doSomething()); + System.out.println("Unused : " + new Unused().doSomething()); + } +} \ No newline at end of file diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Unused.java b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Unused.java new file mode 100644 index 00000000..5871d80c --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Unused.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class Unused { + public String doSomething() { + return "base"; + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/App.java b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/App.java new file mode 100644 index 00000000..3d32c542 --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/App.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class App { + public String doSomething() { + return new SpecificToJava11().doSomething() + " 11"; + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/JavaVersion.java b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/JavaVersion.java new file mode 100644 index 00000000..02718f8d --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/JavaVersion.java @@ -0,0 +1,33 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.util.stream.Collectors; + +public class JavaVersion extends AbstractJavaVersion { + public String getCodeVersion() { + return "11"; + } + + public String getJavaVersion() { + return Runtime.version() + .version() + .stream() + .limit(3) + .map(Object::toString) + .collect(Collectors.joining(".")); + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/OnlyUsedInJava17.java b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/OnlyUsedInJava17.java new file mode 100644 index 00000000..e8b167ad --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/OnlyUsedInJava17.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class OnlyUsedInJava17 { + public String doSomething() { + return new JavaVersion().getJavaMajorVersion(); + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/SpecificToJava11.java b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/SpecificToJava11.java new file mode 100644 index 00000000..bd7447e9 --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/SpecificToJava11.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class SpecificToJava11 { + public String doSomething() { + return "java"; + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/Unused.java b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/Unused.java new file mode 100644 index 00000000..c5effe50 --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/Unused.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class Unused { + public String doSomething() { + return "java 11"; + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/App.java b/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/App.java new file mode 100644 index 00000000..52104847 --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/App.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class App { + public String doSomething() { + return new SpecificToJava17().doSomething() + " " + new OnlyUsedInJava17().doSomething(); + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/SpecificToJava17.java b/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/SpecificToJava17.java new file mode 100644 index 00000000..5e7eb4ed --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/SpecificToJava17.java @@ -0,0 +1,22 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class SpecificToJava17 { + public String doSomething() { + return "java"; + } +} diff --git a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/Unused.java b/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/Unused.java new file mode 100644 index 00000000..76bfd89e --- /dev/null +++ b/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/Unused.java @@ -0,0 +1,21 @@ +package nl.basjes.maven.multijdk; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +public class Unused { + public String doSomething() { + return "java 17"; + } +} diff --git a/src/test/resources-src/pom.xml b/src/test/resources-src/pom.xml new file mode 100644 index 00000000..ca0e49dd --- /dev/null +++ b/src/test/resources-src/pom.xml @@ -0,0 +1,29 @@ + + + + + + 4.0.0 + nl.basjes + test-jars-parent + 1.0 + pom + + multi-jdk + uses-multi-jdk + + \ No newline at end of file diff --git a/src/test/resources-src/uses-multi-jdk/pom.xml b/src/test/resources-src/uses-multi-jdk/pom.xml new file mode 100644 index 00000000..f381c81e --- /dev/null +++ b/src/test/resources-src/uses-multi-jdk/pom.xml @@ -0,0 +1,89 @@ + + + + + + 4.0.0 + + nl.example + uses-multi-jdk + 1.0 + + App using the Multi Release Jar + + + UTF-8 + UTF-8 + + + 2023-11-11T12:34:56Z + + + + + nl.basjes.maven + multi-jdk + 1.0.0 + + + + + + + maven-resources-plugin + 3.3.1 + + + Install jar into resources directory + install + + copy-resources + + + + + target + + ${project.artifactId}-${project.version}.jar + + + + ${project.basedir}/../../resources/ + + + + + + + org.apache.maven.plugins + maven-artifact-plugin + 3.4.1 + + + Ensure reproducible + install + + compare + + + + + + + + + diff --git a/src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java b/src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java new file mode 100644 index 00000000..379668c6 --- /dev/null +++ b/src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java @@ -0,0 +1,27 @@ +package nl.example; +/* + * Copyright 2010-2023 The jdependency developers. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import nl.basjes.maven.multijdk.JavaVersion; +import nl.basjes.maven.multijdk.App; + +public class Main { + public static void main(String[] args) { + JavaVersion javaVersion = new JavaVersion(); + System.out.println("Java detect: " + javaVersion.getCodeVersion()); + System.out.println("Java major : " + javaVersion.getJavaMajorVersion()); + System.out.println("App code : " + new App().doSomething()); + } +} \ No newline at end of file diff --git a/src/test/resources/multi-jdk-1.0.0.jar b/src/test/resources/multi-jdk-1.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..42884c790b85e111bb8f49ed273ff0a01201edff GIT binary patch literal 11956 zcmbVS1z40z7hbx%TN;sAx=TXorCYk2B_#!1Qo5u&L@7Z+1YzkE2|+*vltw@W3BiBS zd*#Yiy#C)l-}CIkocGL}IrGk$IR~VOfQSwNpaKAf7WO)Te>`Zg@5-{8Qta|7a-1Mo zGeTH1)UVBSGl{HUX-VVgQJ@0?XD-FW})P!5} zaFz&Nz3tdWPCg?hK_1cB`JvzTlR&x%)rkeCOum**C?3uP=G`(Em*Zimj4?6kFpr_S zzw9mS$5w~r8ZPF#v%ApPWA7TPd={tcg=U$tJ zOZ)o=2&X;%`M~i1*<(*jH?Xa<6Zq>0f8L(xr|r48E)XI8m57tW1yVE@NST>}?JO_q zCFAdf9Zfwgoi5PN@n0bvJsjL^?JVps!1{&J1TGNyh0z2!{~x1$mHK~;_D|ve(`f&O z_zy-yfK9-KgM~ThX@lR63-^b1zZ(MCPg?(n-r~T-z7xdnbo}7k-x@nPaC{pG$M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V4;xU1p$lc-J@$t; z$;c%uu8jjrXoq%%GDcH1ap2 zCY$$}U@uz+Nsjf01)r(r{jNziy-%!5Z}8tY*JuxUhIKO2+g-u@bU9*xezcF~E@y>R z)tW7>$PGER&x}Sdn%eFF3&7rXl#`f_Q65EbYM$s3WBKJ)7*Eq{=l#Lz+1*`GV z*v*0FOrXzdc`aQYT+V&!VI0KbQf-ghF$HVhAiD9| zL6)oenZyprpIzVpR9s0hwJy73w@`O-E-ByzsGt;u(WnUQ{UN#g^91u*j`);LUEG{q zEZy8~Ey0Rxti4K#N*p^%)r0JVmwU$s6?&HxIQux+0g-Rst}rqZTNe?pzhz1(T5?S; zA||q4TAm_bBU>SJfdhaP;ou1oeqK0oT0!&e!3Ateoqqey_us_ME_BaV)chp}D7?k| zPqBa0*IcCdw8G`vbE_Vv5s?`iLg^!Q{Z5SksUGOOlJiv} zXG#cQbtB)c_@9*g>u%<}vh%s{GiB*8_xm$tKhKPx*LXg|d!~^e^G`LN%U%4H?>(>a ze1`K(V=303YW(M^^t_()dA>6}=&;rB6I))8Blw>6JFnz?vgb^R9qb_ZXG+eQ@2}L) zd5!0j9cLP6V8OwkX}rjM=WqPa^hm%~;4djx>R0#w=f`pWR`?9xm-r(5zwe08(9nLQL&Uf_umCG3*3FQTV7tPiA%ZD>a6RLms#5blt sPu6Gr`qx#&`3|3t#m~?y>HZM?EHVcvA|amw(ZfDBFaQ8a`qN+k12m*`lmGw# literal 0 HcmV?d00001 diff --git a/src/test/resources/uses-multi-jdk-1.0.jar b/src/test/resources/uses-multi-jdk-1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..d2f62b21d0e4d9dd5f4fb244e2730ef4b5e6af3e GIT binary patch literal 2995 zcmb7`2|ScrAIArc7zVkMq^KkeW=tp{!Wh{`wk#p$&Adf3W7k4i%2=c9T-maQ7#h4` z(#?|norn>#8%c<2l5Xxy?tMpE-cSGM^L#$%^F06G@BGhs&Uwz)%$REn2ms M- z+WJQX>+0yPv_SMKk4|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file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e0922ab4..2f6fd21f 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 4.0.0 org.vafer jdependency - 2.9.0 + 2.9.1-SNAPSHOT jdependency This project provides an API to analyse class dependencies http://github.com/tcurdt/jdependency From acc28cdbdec2c1804b8152b808840cf905db8dce Mon Sep 17 00:00:00 2001 From: Niels Basjes Date: Sun, 19 Nov 2023 11:26:37 +0100 Subject: [PATCH 3/4] Changed package name of test classes and jars --- .../jdependency/ClazzpathUnitTestCase.java | 38 +++++++++--------- src/test/resources-src/multi-jdk/pom.xml | 4 +- .../vafer}/multijdk/AbstractJavaVersion.java | 2 +- .../maven => org/vafer}/multijdk/App.java | 2 +- .../vafer}/multijdk/JavaVersion.java | 2 +- .../maven => org/vafer}/multijdk/Main.java | 2 +- .../maven => org/vafer}/multijdk/Unused.java | 2 +- .../maven => org/vafer}/multijdk/App.java | 2 +- .../vafer}/multijdk/JavaVersion.java | 2 +- .../vafer}/multijdk/OnlyUsedInJava17.java | 2 +- .../vafer}/multijdk/SpecificToJava11.java | 2 +- .../maven => org/vafer}/multijdk/Unused.java | 2 +- .../maven => org/vafer}/multijdk/App.java | 2 +- .../vafer}/multijdk/SpecificToJava17.java | 2 +- .../maven => org/vafer}/multijdk/Unused.java | 2 +- src/test/resources-src/uses-multi-jdk/pom.xml | 2 +- .../src/main/java/nl/example/Main.java | 4 +- src/test/resources/multi-jdk-1.0.0.jar | Bin 11956 -> 11251 bytes src/test/resources/uses-multi-jdk-1.0.jar | Bin 2995 -> 2984 bytes 19 files changed, 37 insertions(+), 37 deletions(-) rename src/test/resources-src/multi-jdk/src/main/java/{nl/basjes/maven => org/vafer}/multijdk/AbstractJavaVersion.java (96%) rename src/test/resources-src/multi-jdk/src/main/java/{nl/basjes/maven => org/vafer}/multijdk/App.java (95%) rename src/test/resources-src/multi-jdk/src/main/java/{nl/basjes/maven => org/vafer}/multijdk/JavaVersion.java (96%) rename src/test/resources-src/multi-jdk/src/main/java/{nl/basjes/maven => org/vafer}/multijdk/Main.java (96%) rename src/test/resources-src/multi-jdk/src/main/java/{nl/basjes/maven => org/vafer}/multijdk/Unused.java (95%) rename src/test/resources-src/multi-jdk/src/main/java11/{nl/basjes/maven => org/vafer}/multijdk/App.java (95%) rename src/test/resources-src/multi-jdk/src/main/java11/{nl/basjes/maven => org/vafer}/multijdk/JavaVersion.java (96%) rename src/test/resources-src/multi-jdk/src/main/java11/{nl/basjes/maven => org/vafer}/multijdk/OnlyUsedInJava17.java (95%) rename src/test/resources-src/multi-jdk/src/main/java11/{nl/basjes/maven => org/vafer}/multijdk/SpecificToJava11.java (95%) rename src/test/resources-src/multi-jdk/src/main/java11/{nl/basjes/maven => org/vafer}/multijdk/Unused.java (95%) rename src/test/resources-src/multi-jdk/src/main/java17/{nl/basjes/maven => org/vafer}/multijdk/App.java (95%) rename src/test/resources-src/multi-jdk/src/main/java17/{nl/basjes/maven => org/vafer}/multijdk/SpecificToJava17.java (95%) rename src/test/resources-src/multi-jdk/src/main/java17/{nl/basjes/maven => org/vafer}/multijdk/Unused.java (95%) diff --git a/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java b/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java index a9afda9b..16c7371f 100644 --- a/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java +++ b/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java @@ -206,20 +206,20 @@ private void verifyFileNameParsingInvalid(String fileName) { @Test public void testFileNameCheck(){ - assertFalse(Clazz.isMultiReleaseClassFile("nl/basjes/maven/multijdk/App.class")); - assertTrue(Clazz.isMultiReleaseClassFile("META-INF/versions/11/nl/basjes/maven/multijdk/App.class")); - assertTrue(Clazz.isMultiReleaseClassFile("META-INF/versions/1234/nl/basjes/maven/multijdk/App.class")); + assertFalse(Clazz.isMultiReleaseClassFile("org/vafer/multijdk/App.class")); + assertTrue(Clazz.isMultiReleaseClassFile("META-INF/versions/11/org/vafer/multijdk/App.class")); + assertTrue(Clazz.isMultiReleaseClassFile("META-INF/versions/1234/org/vafer/multijdk/App.class")); } @Test public void testFileNameParsing(){ - verifyFileNameParsing("nl/basjes/maven/multijdk/App.class", "8", "nl.basjes.maven.multijdk.App"); - verifyFileNameParsing("META-INF/versions/11/nl/basjes/maven/multijdk/App.class", "11", "nl.basjes.maven.multijdk.App"); - verifyFileNameParsing("META-INF/versions/1234/nl/basjes/maven/multijdk/App.class", "1234", "nl.basjes.maven.multijdk.App"); + verifyFileNameParsing("org/vafer/multijdk/App.class", "8", "org.vafer.multijdk.App"); + verifyFileNameParsing("META-INF/versions/11/org/vafer/multijdk/App.class", "11", "org.vafer.multijdk.App"); + verifyFileNameParsing("META-INF/versions/1234/org/vafer/multijdk/App.class", "1234", "org.vafer.multijdk.App"); - verifyFileNameParsingInvalid("nl/basjes/maven/multijdk/App.classsssss"); - verifyFileNameParsingInvalid("nl/basjes/maven/multijdk/App.txt"); - verifyFileNameParsingInvalid("META-INF/versions/xxx/nl/basjes/maven/multijdk/App.class"); + verifyFileNameParsingInvalid("org/vafer/multijdk/App.classsssss"); + verifyFileNameParsingInvalid("org/vafer/multijdk/App.txt"); + verifyFileNameParsingInvalid("META-INF/versions/xxx/org/vafer/multijdk/App.class"); } private void verifyFileInClazz(Clazz clazz, String expectedFilename, String forJava, boolean mustBePresent) { @@ -254,14 +254,14 @@ public void testMultiReleaseJar() throws IOException { final ClazzpathUnit dependency = cp.addClazzpathUnit(resourceFile("multi-jdk-1.0.0.jar")); Map dependencyClazzes = dependency.getClazzesMap(); // Java 8, Java 11, Java 17 - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.Main"), true, false, false); - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.App"), true, true, true); - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.AbstractJavaVersion"), true, false, false); - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.JavaVersion"), true, true, false); - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.Unused"), true, true, true); - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.OnlyUsedInJava17"), false, true, false); - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.SpecificToJava11"), false, true, false); - verifyClazzFiles(dependencyClazzes.get("nl.basjes.maven.multijdk.SpecificToJava17"), false, false, true); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.Main"), true, false, false); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.App"), true, true, true); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.AbstractJavaVersion"), true, false, false); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.JavaVersion"), true, true, false); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.Unused"), true, true, true); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.OnlyUsedInJava17"), false, true, false); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.SpecificToJava11"), false, true, false); + verifyClazzFiles(dependencyClazzes.get("org.vafer.multijdk.SpecificToJava17"), false, false, true); // Check which are obsolete final Set removable = cp.getClazzes(); @@ -273,8 +273,8 @@ public void testMultiReleaseJar() throws IOException { .collect(Collectors.toMap(Clazz::getName, Function.identity())); assertEquals(2, removableClazzes.size()); - assertTrue(removableClazzes.containsKey("nl.basjes.maven.multijdk.Main")); - assertTrue(removableClazzes.containsKey("nl.basjes.maven.multijdk.Unused")); + assertTrue(removableClazzes.containsKey("org.vafer.multijdk.Main")); + assertTrue(removableClazzes.containsKey("org.vafer.multijdk.Unused")); } } diff --git a/src/test/resources-src/multi-jdk/pom.xml b/src/test/resources-src/multi-jdk/pom.xml index 00ca4b2e..fd69448a 100644 --- a/src/test/resources-src/multi-jdk/pom.xml +++ b/src/test/resources-src/multi-jdk/pom.xml @@ -24,7 +24,7 @@ Multi Release Jar - nl.basjes.maven + org.vafer multi-jdk 1.0.0 @@ -85,7 +85,7 @@ - nl.basjes.maven.multijdk.Main + org.vafer.multijdk.Main true diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/AbstractJavaVersion.java b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/AbstractJavaVersion.java similarity index 96% rename from src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/AbstractJavaVersion.java rename to src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/AbstractJavaVersion.java index 1343829b..a23b255a 100644 --- a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/AbstractJavaVersion.java +++ b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/AbstractJavaVersion.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/App.java b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/App.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/App.java rename to src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/App.java index c53bfce4..250fcd6e 100644 --- a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/App.java +++ b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/App.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/JavaVersion.java b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/JavaVersion.java similarity index 96% rename from src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/JavaVersion.java rename to src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/JavaVersion.java index 3b2a6661..a2cbfef5 100644 --- a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/JavaVersion.java +++ b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/JavaVersion.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Main.java b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/Main.java similarity index 96% rename from src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Main.java rename to src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/Main.java index 09804a43..3e469b64 100644 --- a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Main.java +++ b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/Main.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Unused.java b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/Unused.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Unused.java rename to src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/Unused.java index 5871d80c..0961fdfd 100644 --- a/src/test/resources-src/multi-jdk/src/main/java/nl/basjes/maven/multijdk/Unused.java +++ b/src/test/resources-src/multi-jdk/src/main/java/org/vafer/multijdk/Unused.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/App.java b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/App.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/App.java rename to src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/App.java index 3d32c542..bbb93303 100644 --- a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/App.java +++ b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/App.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/JavaVersion.java b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/JavaVersion.java similarity index 96% rename from src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/JavaVersion.java rename to src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/JavaVersion.java index 02718f8d..3cb84629 100644 --- a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/JavaVersion.java +++ b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/JavaVersion.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/OnlyUsedInJava17.java b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/OnlyUsedInJava17.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/OnlyUsedInJava17.java rename to src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/OnlyUsedInJava17.java index e8b167ad..26c2fcb6 100644 --- a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/OnlyUsedInJava17.java +++ b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/OnlyUsedInJava17.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/SpecificToJava11.java b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/SpecificToJava11.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/SpecificToJava11.java rename to src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/SpecificToJava11.java index bd7447e9..cfaaff71 100644 --- a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/SpecificToJava11.java +++ b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/SpecificToJava11.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/Unused.java b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/Unused.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/Unused.java rename to src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/Unused.java index c5effe50..75339a81 100644 --- a/src/test/resources-src/multi-jdk/src/main/java11/nl/basjes/maven/multijdk/Unused.java +++ b/src/test/resources-src/multi-jdk/src/main/java11/org/vafer/multijdk/Unused.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/App.java b/src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/App.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/App.java rename to src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/App.java index 52104847..8a918662 100644 --- a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/App.java +++ b/src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/App.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/SpecificToJava17.java b/src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/SpecificToJava17.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/SpecificToJava17.java rename to src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/SpecificToJava17.java index 5e7eb4ed..d927c18e 100644 --- a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/SpecificToJava17.java +++ b/src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/SpecificToJava17.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/Unused.java b/src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/Unused.java similarity index 95% rename from src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/Unused.java rename to src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/Unused.java index 76bfd89e..0c12f545 100644 --- a/src/test/resources-src/multi-jdk/src/main/java17/nl/basjes/maven/multijdk/Unused.java +++ b/src/test/resources-src/multi-jdk/src/main/java17/org/vafer/multijdk/Unused.java @@ -1,4 +1,4 @@ -package nl.basjes.maven.multijdk; +package org.vafer.multijdk; /* * Copyright 2010-2023 The jdependency developers. * diff --git a/src/test/resources-src/uses-multi-jdk/pom.xml b/src/test/resources-src/uses-multi-jdk/pom.xml index f381c81e..49363727 100644 --- a/src/test/resources-src/uses-multi-jdk/pom.xml +++ b/src/test/resources-src/uses-multi-jdk/pom.xml @@ -35,7 +35,7 @@ - nl.basjes.maven + org.vafer multi-jdk 1.0.0 diff --git a/src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java b/src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java index 379668c6..0238131e 100644 --- a/src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java +++ b/src/test/resources-src/uses-multi-jdk/src/main/java/nl/example/Main.java @@ -14,8 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import nl.basjes.maven.multijdk.JavaVersion; -import nl.basjes.maven.multijdk.App; +import org.vafer.multijdk.JavaVersion; +import org.vafer.multijdk.App; public class Main { public static void main(String[] args) { diff --git a/src/test/resources/multi-jdk-1.0.0.jar b/src/test/resources/multi-jdk-1.0.0.jar index 42884c790b85e111bb8f49ed273ff0a01201edff..edde3a960458fa1ccb9431d4fa60ce158a20c43c 100644 GIT binary patch literal 11251 zcmbVS1yq$=(>}Dok?xd^OP91D-G@fHyOEX-DQT1t=?*!fln6*mcQ*(~cL?f#(0k>| z#rXc$^{#am?s;bR?7g3N_RN4}U|^8|fExgSwy~8u;9n0S?4tXJey&NVdEH5Q4rmVswCypK7iPXq~2H5sHZ~EK-pMyYlds2(+ z7IrPOsn$sA%O%B~ZJWrZF77ZkC#I8yc$09P(&fzI=tLyX4IdmLVj_cDg`FGDF*i~_ zXb!3)l1S7qIISG>%)E4@M1Ls6qct{Qh?2~cWOq|c(3?{(O;O}2H;YLHNXew+!RVu(NggI=kz~V_!R-mGu`Q_&*b|b2R&f80oLXTntQ29DgB9`+H#< zXY2bGmc~}UK>5jJZ~sE%CzHL+{QsKlH?jZcWdAMv2a|<`xa`+PLUzR05x=ts^M`SN zpc?hxt7T*0Vq*KJ9{x5MVm8z7jH39jj!UtxHZuOR87|LtfnQj_Dii?V3IhPJ{u|)? zNrCMA3#Wb4{(Y*#_V!Fh)&@>akCY~D2ZhiC2D2UPZz7T%H0HeIV3Z;)+Y1y$!w@Y5 z;JZnx1iDRdPu|CDvl>s4{Ddh8qnocnDd-z@Hv&_J(MCvPud8PxsoYF_e}8lw6`)XN zXN1Uu?2gb$i`F5+ifwzV(eJG8c6=Qf*0Tao(n_HA8wc|Y$+7<3h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JfdhaP;ou1oeqK0oT0!&e!3Ateoqqey_us_ME_BaV)chp}D7?k| zPqBa0*IcCdw8G`vbE_Vv5s?`iLg^!Q{Z5SksUGOOlJiv} zXG#cQbtB)c_@9*g>u%<}vh%s{GiB*8_xm$tKhKPx*LXg|d!~^e^G`LN%U%4H?>(>a ze1`K(V=303YW(M^^t_()dA>6}=&;rB6I))8Blw>6JFnz?vgb^R9qb_ZXG+eQ@2}L) zd5!0j9cLP6V8OwkX}rjM=WqPa^hm%~;4djx>R0#w=f`pWR`?9xm-r(5zwe08(9nLQL&Uf_umCG3*3FQTV7tPiA%ZD>a6RLms#5blt sPu6Gr`qx#&`3|3t#m~?y>HZM?EHVcvA|amw(ZfDBFaQ8a`qN+k12m*`lmGw# diff --git a/src/test/resources/uses-multi-jdk-1.0.jar b/src/test/resources/uses-multi-jdk-1.0.jar index d2f62b21d0e4d9dd5f4fb244e2730ef4b5e6af3e..9d705f5822031d662ef86dbd7bf89a9105a3716e 100644 GIT binary patch delta 1731 zcmV;!20Zz*7pNDotpR`choTQj0ssII1ONaP0001PY%gVaVQp}1WiL%(X>KlKY+-YA zeN)+P(?AqG)1n6H~% z(TW%{+m7!rRoo`ZUax1g$hct;MZpF`IpM%)m4+HpGTeXFaZhT_w1ax!iRc44P_W4` z@4Ke>#J!#?%meO_*R=d41lW!*UJbma2;cIiOO?DGw7A>gp(E#$Vw$A-3=8%d9g83@ z)+<*IlbR=-haI985@0ggJ-KcShW-BwNd&DP48oRp;Ye3mX<n>pu9Uq*8T=-}oxdwitd+@%j4C~VH7sEl%V=UHwpt$B z!8V>!R&j_OJc~Qrjrn`O0Z>Z=1QY-O2nYaNWNQjn%}0j1)dK(kd6PE;Ie%Mk<3tpG z&#yQ{Jb+Z&Nm>vpUavx%6^131nv~V@HnC5f$=Wk!W}J&q`R$zXC9!i^tq??!qH~?^ zT)xx#Z+BS=8&sN0@uoj?2Yo;h$(W1eP5)*7&iSGLHt6;IuNNTbQp9)-mQNVhY_ujDH(U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0ZP*F#<^llVJ)glY|Q%2G|Gy0000EO*M-E From 684c2e9f4980da86fb3ff220a290956b3d489b7b Mon Sep 17 00:00:00 2001 From: Niels Basjes Date: Sun, 19 Nov 2023 11:31:22 +0100 Subject: [PATCH 4/4] Make the tests a bit more robust. --- .../java/org/vafer/jdependency/ClazzpathUnitTestCase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java b/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java index 16c7371f..e1104838 100644 --- a/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java +++ b/src/test/java/org/vafer/jdependency/ClazzpathUnitTestCase.java @@ -86,7 +86,7 @@ public void testIssue47() throws IOException { .map( i -> i.toString() ) .collect(Collectors.toSet()); assertEquals(1, units.size()); - assertTrue(units.iterator().next().endsWith("woodstox-core-6.2.3.jar")); + assertTrue(units.iterator().next().endsWith("/woodstox-core-6.2.3.jar")); } @Test @@ -167,13 +167,13 @@ public void testShouldHaveUnitId() throws IOException { final Clazzpath cp = new Clazzpath(); final ClazzpathUnit u1 = cp.addClazzpathUnit(resourceFile("jar1.jar")); - assertTrue(u1.toString().endsWith("jar1.jar")); + assertTrue(u1.toString().endsWith("/jar1.jar")); final ClazzpathUnit u1e = cp.addClazzpathUnit(resourceFile("jar1.jar"), "jar1"); assertEquals(u1e.toString(), "jar1"); final ClazzpathUnit u2 = cp.addClazzpathUnit(resourcePath("jar2.jar")); - assertTrue(u2.toString().endsWith("jar2.jar")); + assertTrue(u2.toString().endsWith("/jar2.jar")); final ClazzpathUnit u2e = cp.addClazzpathUnit(resourcePath("jar2.jar"), "jar2"); assertEquals(u2e.toString(), "jar2");