Code Review
/
dmaap
/
datarouter.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
More bug fix and refactoring
[dmaap/datarouter.git]
/
datarouter-node
/
src
/
main
/
java
/
org
/
onap
/
dmaap
/
datarouter
/
node
/
Delivery.java
diff --git
a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java
b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java
index
4675081
..
5931856
100644
(file)
--- a/
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java
+++ b/
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/Delivery.java
@@
-66,7
+66,6
@@
public class Delivery {
this.config = config;
Runnable cmon = this::checkconfig;
config.registerConfigTask(cmon);
this.config = config;
Runnable cmon = this::checkconfig;
config.registerConfigTask(cmon);
- checkconfig();
}
/**
}
/**
@@
-168,7
+167,9
@@
public class Delivery {
}
}
try {
}
}
try {
- Files.delete(sxf.toPath()); // won't if anything still in it
+ if (sxf.list().length == 0) {
+ Files.delete(sxf.toPath()); // won't if anything still in it
+ }
} catch (IOException e) {
logger.error("Failed to delete file: " + sxf.getPath(), e);
}
} catch (IOException e) {
logger.error("Failed to delete file: " + sxf.getPath(), e);
}