mirror of
				https://github.com/PlaceholderAPI/PlaceholderAPI
				synced 2025-10-30 18:03:43 +01:00 
			
		
		
		
	try with resources cuz haters
This commit is contained in:
		| @@ -67,9 +67,7 @@ public class FileUtil { | ||||
|     if (list == null) { | ||||
|       list = new ArrayList<>(); | ||||
|     } | ||||
|     try { | ||||
|       URLClassLoader cl = new URLClassLoader(new URL[]{jar}, clazz.getClassLoader()); | ||||
|       JarInputStream jis = new JarInputStream(jar.openStream()); | ||||
|     try (URLClassLoader cl = new URLClassLoader(new URL[]{jar}, clazz.getClassLoader()); JarInputStream jis = new JarInputStream(jar.openStream())) { | ||||
|       while (true) { | ||||
|         JarEntry j = jis.getNextJarEntry(); | ||||
|         if (j == null) { | ||||
| @@ -88,8 +86,6 @@ public class FileUtil { | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|       cl.close(); | ||||
|       jis.close(); | ||||
|     } catch (Throwable t) { | ||||
|     } | ||||
|     return list; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user