mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI.git
synced 2024-11-16 07:35:32 +01:00
Extracted URLClassLoader out of try-with-resources block
This commit is contained in:
parent
0c6dd5466c
commit
09e68e7510
@ -42,13 +42,11 @@ public class FileUtil {
|
||||
}
|
||||
|
||||
final URL jar = file.toURI().toURL();
|
||||
|
||||
final URLClassLoader loader = new URLClassLoader(new URL[]{jar}, clazz.getClassLoader());
|
||||
final List<String> matches = new ArrayList<>();
|
||||
final List<Class<? extends T>> classes = new ArrayList<>();
|
||||
|
||||
try (final JarInputStream stream = new JarInputStream(
|
||||
jar.openStream()); final URLClassLoader loader = new URLClassLoader(new URL[]{jar},
|
||||
clazz.getClassLoader())) {
|
||||
try (final JarInputStream stream = new JarInputStream(jar.openStream())) {
|
||||
JarEntry entry;
|
||||
while ((entry = stream.getNextJarEntry()) != null) {
|
||||
final String name = entry.getName();
|
||||
|
Loading…
Reference in New Issue
Block a user