work with jar file before closing it
This commit is contained in:
@@ -55,9 +55,6 @@ public class Main {
|
|||||||
Enumeration<JarEntry> entries;
|
Enumeration<JarEntry> entries;
|
||||||
try (var jarFile = new JarFile(URLDecoder.decode(cleanPath, StandardCharsets.UTF_8))) {
|
try (var jarFile = new JarFile(URLDecoder.decode(cleanPath, StandardCharsets.UTF_8))) {
|
||||||
entries = jarFile.entries();
|
entries = jarFile.entries();
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException("Kann JAR-Datei zwecks Reflection nicht öffnen:", e);
|
|
||||||
}
|
|
||||||
while (entries.hasMoreElements()) {
|
while (entries.hasMoreElements()) {
|
||||||
JarEntry entry = entries.nextElement();
|
JarEntry entry = entries.nextElement();
|
||||||
if (entry.isDirectory()) {
|
if (entry.isDirectory()) {
|
||||||
@@ -65,6 +62,9 @@ public class Main {
|
|||||||
}
|
}
|
||||||
fileNames.add(entry.getName());
|
fileNames.add(entry.getName());
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException("Kann JAR-Datei zwecks Reflection nicht öffnen:", e);
|
||||||
|
}
|
||||||
var increment = new AtomicInteger();
|
var increment = new AtomicInteger();
|
||||||
return Collections.unmodifiableSortedMap(new TreeMap<>(
|
return Collections.unmodifiableSortedMap(new TreeMap<>(
|
||||||
fileNames.stream()
|
fileNames.stream()
|
||||||
|
|||||||
Reference in New Issue
Block a user