This commit is contained in:
Gabriele C 2015-09-08 18:12:31 +02:00
parent c1d56d5ee5
commit 46002b95e3

View File

@ -48,11 +48,11 @@ public class ModuleManager implements Module {
@Override @Override
public boolean load() { public boolean load() {
File dir = new File(plugin.getDataFolder() + File.separator + "modules"); File dir = new File(plugin.getDataFolder() + File.separator + "modules");
String[] files = dir.list(); File[] files = dir.listFiles();
if (files == null || files.length == 0){ if (files == null) {
return false; return false;
} }
for (File pathToJar : dir.listFiles()) { // FindBugs: "possible null pointers" O_o ? for (File pathToJar : files) {
JarFile jarFile = null; JarFile jarFile = null;
try { try {
jarFile = new JarFile(pathToJar); jarFile = new JarFile(pathToJar);