In JarVersionedRuntimes.java:47-49:
public JarClasses getJarClasses(Integer version) {
return versionedRuntimeMap.get(version).getJarClasses(); // NPE if version absent
}
If the requested version is not a key in the map, get(version) returns null, then .getJarClasses() throws a NullPointerException. This is inconsistent with getJarVersionedRuntime() on the same class, which safely returns null for missing keys. Any caller querying a non-existent version will crash.
Fix: Guard against null, e.g.:
JarVersionedRuntime runtime = versionedRuntimeMap.get(version);
return runtime != null ? runtime.getJarClasses() : null;
In
JarVersionedRuntimes.java:47-49:If the requested
versionis not a key in the map,get(version)returnsnull, then.getJarClasses()throws a NullPointerException. This is inconsistent withgetJarVersionedRuntime()on the same class, which safely returnsnullfor missing keys. Any caller querying a non-existent version will crash.Fix: Guard against null, e.g.: