protected File getNextVersionedJarFile(String unversionedJarName) {
    int maxVersion = getMaxVersion(JarFileUtils.getArtifactId(unversionedJarName));

    String nextVersionJarName =
        FilenameUtils.getBaseName(unversionedJarName) + ".v" + (maxVersion + 1) + ".jar";

    logger.debug("Next versioned jar name for {} is {}", unversionedJarName, nextVersionJarName);

    return new File(deployDirectory, nextVersionJarName);
  }
Writes the jarBytes for the given jarName to the next version of that jar file (if the bytes do
not match the latest deployed version).

@return the DeployedJar that was written from jarBytes, or null if those bytes matched the
        latest deployed version
geode-deployment/geode-deployment-legacy/src/main/java/org/apache/geode/deployment/internal/JarDeployer.java