Class MultiReleaseUtil

java.lang.Object
org.apache.tomcat.util.scan.MultiReleaseUtil

public class MultiReleaseUtil extends Object
Utility class for working with multi-release JAR files.
  • Method Details

    • parseVersion

      public static MultiReleaseUtil.MultiReleaseInfo parseVersion(String name)
      Parses a JAR entry name and, if it represents a multi-release JAR entry, returns the target Java version and the start point of the resource name in the JAR entry name. Version numbers with leading zeros, signs or values less than 8 are ignored to match the JRE 21 onwards behaviour.
      Parameters:
      name - Name of the JAR entry
      Returns:
      The MultiVersionInfo for the entry if the entry represents a versioned entry, otherwise null