[tranche] r283 committed - Fix for NPE when running scripts with DBUtil without FFTS

0 views
Skip to first unread message

tra...@googlecode.com

unread,
Jul 30, 2010, 3:08:23 PM7/30/10
to tranche-d...@googlegroups.com
Revision: 283
Author: bryanesmith
Date: Fri Jul 30 12:08:01 2010
Log: Fix for NPE when running scripts with DBUtil without FFTS
http://code.google.com/p/tranche/source/detail?r=283

Modified:
/src/org/tranche/flatfile/DataBlockUtil.java

=======================================
--- /src/org/tranche/flatfile/DataBlockUtil.java Tue Apr 27 10:26:55 2010
+++ /src/org/tranche/flatfile/DataBlockUtil.java Fri Jul 30 12:08:01 2010
@@ -990,7 +990,12 @@
* @return
*/
public File getDataDeletionLog() {
- return new
File(this.ffts.getHomeDirectory(), "deleted-data-chunks.log");
+ final String log = "deleted-data-chunks.log";
+ if (this.ffts != null) {
+ return new File(this.ffts.getHomeDirectory(), log);
+ }
+
+ return new File(log);
}

/**
@@ -1032,7 +1037,11 @@
* @return
*/
public File getCorruptedDataBlocksLog() {
- return new
File(this.ffts.getHomeDirectory(), "corrupted-datablocks.log");
+ final String log = "corrupted-datablocks.log";
+ if (this.ffts != null) {
+ return new File(this.ffts.getHomeDirectory(), log);
+ }
+ return new File(log);
}

/**
@@ -1040,7 +1049,11 @@
* @return
*/
public File getMetaDataDeletionLog() {
- return new
File(this.ffts.getHomeDirectory(), "deleted-meta-data-chunks.log");
+ final String log = "deleted-meta-data-chunks.log";
+ if (this.ffts != null) {
+ return new File(this.ffts.getHomeDirectory(), log);
+ }
+ return new File(log);
}
private boolean lastLogDataDeletions =
ConfigKeys.DEFAULT_LOG_DATA_CHUNK_DELETIONS;

Reply all
Reply to author
Forward
0 new messages