-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
SonarCloud instance reports the failures here:
"Use try-with-resources or close this "URLClassLoader" in a "finally" clause."
"Use try-with-resources or close this "JarFile" in a "finally" clause."
private Multiset<String> processJAR(String jarName) {
Multiset<String> shapes = new Multiset<>();
try {
URLClassLoader cl = URLClassLoader.newInstance(new URL[]{new URL("jar:file:" + jarName + "!/")});
JarFile jarFile = new JarFile(jarName);
"Use try-with-resources or close this "URLClassLoader" in a "finally" clause."
"Use try-with-resources or close this "JarFile" in a "finally" clause."
private Multiset<String> processJAR(String jarName) {
Multiset<String> shapes = new Multiset<>();
try {
URLClassLoader cl = URLClassLoader.newInstance(new URL[]{new URL("jar:file:" + jarName + "!/")});
JarFile jarFile = new JarFile(jarName);
- links to
-
Review openjdk/jol/9