X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=datarouter-node%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fnode%2FStatusLog.java;h=2e646043913aa852a1587779419adff7f8aa5ec3;hb=6c78b3e6a0a67c73f931337356a172cc69cee0e8;hp=8d59ebe90c7c3f9e2aceb8db84804e60d3673c31;hpb=bc1df610cddfb558cf6bde90c269b4af59768648;p=dmaap%2Fdatarouter.git diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java index 8d59ebe9..2e646043 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java @@ -266,7 +266,7 @@ public class StatusLog { nexttime = now - now % intvl + intvl; curfile = prefix + filedate.format(new Date(nexttime - intvl)) + suffix; plainfile = prefix + suffix; - notify(); + notifyAll(); } } @@ -276,7 +276,7 @@ public class StatusLog { checkRoll(now); if (os == null) { os = new FileOutputStream(curfile, true); - (new File(plainfile)).delete(); + Files.deleteIfExists(new File(plainfile).toPath()); Files.createLink(Paths.get(plainfile), Paths.get(curfile)); } os.write((NodeUtils.logts(new Date(now)) + '|' + string + '\n').getBytes());