commit | 2fc93e5609ef648e083e8fcb3b7ac1c29f149ae1 | [log] [tgz] |
---|---|---|
author | alexander.behm <alexander.behm@123451ca-8445-de46-9d55-352943316053> | Tue Feb 14 20:35:02 2012 +0000 |
committer | alexander.behm <alexander.behm@123451ca-8445-de46-9d55-352943316053> | Tue Feb 14 20:35:02 2012 +0000 |
tree | 00f72d78de898b74ee909b162f3712343564a237 | |
parent | 78a50b9794230245b1d8c1d13a7421290cc18742 [diff] |
Fixed NPE in LSMBTreeUpdateTest. git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_lsm_tree@1184 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-tests/hyracks-storage-am-lsm-btree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/btree/util/LSMBTreeTestHarness.java b/hyracks-tests/hyracks-storage-am-lsm-btree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/btree/util/LSMBTreeTestHarness.java index 83691ff..02d821b 100644 --- a/hyracks-tests/hyracks-storage-am-lsm-btree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/btree/util/LSMBTreeTestHarness.java +++ b/hyracks-tests/hyracks-storage-am-lsm-btree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/btree/util/LSMBTreeTestHarness.java
@@ -45,7 +45,6 @@ private static final long RANDOM_SEED = 50; private static final int DEFAULT_DISK_PAGE_SIZE = 256; private static final int DEFAULT_DISK_NUM_PAGES = 1000; - //private static final int DEFAULT_DISK_NUM_PAGES = 100; private static final int DEFAULT_DISK_MAX_OPEN_FILES = 200; private static final int DEFAULT_MEM_PAGE_SIZE = 256; private static final int DEFAULT_MEM_NUM_PAGES = 100; @@ -113,9 +112,11 @@ } }; String[] files = dir.list(filter); - for (String fileName : files) { - File file = new File(dir.getPath() + File.separator + fileName); - file.delete(); + if (files != null) { + for (String fileName : files) { + File file = new File(dir.getPath() + File.separator + fileName); + file.delete(); + } } dir.delete(); }
diff --git a/hyracks-tests/hyracks-storage-am-lsm-rtree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/util/LSMRTreeTestHarness.java b/hyracks-tests/hyracks-storage-am-lsm-rtree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/util/LSMRTreeTestHarness.java index c12a4dcd..23ad438 100644 --- a/hyracks-tests/hyracks-storage-am-lsm-rtree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/util/LSMRTreeTestHarness.java +++ b/hyracks-tests/hyracks-storage-am-lsm-rtree-test/src/test/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/util/LSMRTreeTestHarness.java
@@ -111,9 +111,11 @@ } }; String[] files = dir.list(filter); - for (String fileName : files) { - File file = new File(dir.getPath() + File.separator + fileName); - file.delete(); + if (files != null) { + for (String fileName : files) { + File file = new File(dir.getPath() + File.separator + fileName); + file.delete(); + } } dir.delete(); }