[fb] findbugs 3.0.1. Added filter for InMemoryJavaCompiler.

Fixed some fb markers

Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
This commit is contained in:
Dennis Huebner 2015-05-05 11:02:04 +02:00
parent fde04fa884
commit 99f99b4ab8
2 changed files with 6 additions and 3 deletions

View file

@ -3,5 +3,5 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View file

@ -68,7 +68,7 @@ public class Files {
}
}
public static boolean cleanFolder(File parentFolder, final FileFilter filter, boolean continueOnError,
public static boolean cleanFolder(final File parentFolder, final FileFilter filter, boolean continueOnError,
boolean deleteParentFolder) throws FileNotFoundException {
if (!parentFolder.exists()) {
throw new FileNotFoundException(parentFolder.getAbsolutePath());
@ -83,6 +83,9 @@ public class Files {
};
log.debug("Cleaning folder " + parentFolder.toString());
final File[] contents = parentFolder.listFiles(myFilter);
if (contents == null) {
return true;
}
for (int j = 0; j < contents.length; j++) {
final File file = contents[j];
if (file.isDirectory()) {
@ -97,7 +100,7 @@ public class Files {
}
}
if (deleteParentFolder) {
if (parentFolder.list().length==0 && !parentFolder.delete()) {
if (parentFolder.list() != null && parentFolder.list().length == 0 && !parentFolder.delete()) {
log.error("Couldn't delete " + parentFolder.getAbsolutePath());
return false;
}