NO-JIRA Fix a "Dereference null return value" Coverity Scan warning
The value checked for null was not the one that was subsequently used.
This commit is contained in:
parent
8ff0cba3d6
commit
b8df8dead3
|
@ -146,7 +146,7 @@ public class SpawnedVMSupport {
|
|||
if (files == null) {
|
||||
return getClassPath();
|
||||
} else {
|
||||
for (File f : libfolder.listFiles()) {
|
||||
for (File f : files) {
|
||||
if (f.getName().endsWith(".jar") || f.getName().endsWith(".zip")) {
|
||||
if (!empty) {
|
||||
stringBuilder.append(File.pathSeparator);
|
||||
|
|
|
@ -65,9 +65,11 @@ public class WebTmpCleaner {
|
|||
public static final void deleteFolder(final File file) {
|
||||
if (file.isDirectory()) {
|
||||
String[] files = file.list();
|
||||
for (String path : files) {
|
||||
File f = new File(file, path);
|
||||
deleteFolder(f);
|
||||
if (files != null) {
|
||||
for (String path : files) {
|
||||
File f = new File(file, path);
|
||||
deleteFolder(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
file.delete();
|
||||
|
|
Loading…
Reference in New Issue