Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-09-26 12:22:16 -0400
committerChristopher Frost2012-09-26 12:22:16 -0400
commit4a66e7e5c573bce56184086167984299bb8fb6c0 (patch)
tree6ab31d2cf654649a638184e3cdfd3b2b75b1f207
parent55c85f5d8251402db3bab30f297b55910a519662 (diff)
downloadorg.eclipse.virgo.medic-4a66e7e5c573bce56184086167984299bb8fb6c0.tar.gz
org.eclipse.virgo.medic-4a66e7e5c573bce56184086167984299bb8fb6c0.tar.xz
org.eclipse.virgo.medic-4a66e7e5c573bce56184086167984299bb8fb6c0.zip
390460 When displaying dump folders only directories that exist should be shown
-rw-r--r--org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java
index 944ec22..ce2d605 100644
--- a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java
+++ b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/management/FileSystemDumpInspector.java
@@ -58,8 +58,16 @@ public class FileSystemDumpInspector implements DumpInspector {
@Override
public String[] getDumps() throws IOException {
File dumpDir = getDumpDirectory();
+ List<String> dumps = new ArrayList<String>();
if(dumpDir != null && dumpDir.exists() && dumpDir.isDirectory()){
- return FileSystemUtils.list(dumpDir, this.logger);
+ String[] list = FileSystemUtils.list(dumpDir, this.logger);
+ for (String dumpFolderName : list) {
+ File dumpFolder = new File(dumpDir, dumpFolderName);
+ if(dumpFolder.exists() && dumpFolder.isDirectory()){
+ dumps.add(dumpFolderName);
+ }
+ }
+ return dumps.toArray(new String[dumps.size()]);
} else {
return new String[0];
}

Back to the top