Hi, you missed a "no" in the errormessage ;)I used another way to optimize that part. On my machine, the list() method is much faster than listFiles():
String [] boundaryFileNames = boundaryDir.list();
boolean foundBndFile = false;
for (String s: boundaryFileNames){
if (s.endsWith(".bnd")) {
foundBndFile = true;
break;
}
}
if (!foundBndFile) {
log.error("Disable LocationHook because boundary directory contains files. Dir: "
+ boundaryDir);
return false;
}
Gerd