diff options
Diffstat (limited to 'src/main/java/org/openecomp/datarouter/util/FileWatcher.java')
-rw-r--r-- | src/main/java/org/openecomp/datarouter/util/FileWatcher.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/openecomp/datarouter/util/FileWatcher.java b/src/main/java/org/openecomp/datarouter/util/FileWatcher.java index 5b04310..8ae69d3 100644 --- a/src/main/java/org/openecomp/datarouter/util/FileWatcher.java +++ b/src/main/java/org/openecomp/datarouter/util/FileWatcher.java @@ -34,14 +34,15 @@ public abstract class FileWatcher extends TimerTask { this.timeStamp = file.lastModified(); } + @Override public final void run() { - long timeStamp = file.lastModified(); + long newTimeStamp = file.lastModified(); - if ((timeStamp - this.timeStamp) > 500) { - this.timeStamp = timeStamp; + if ((newTimeStamp - this.timeStamp) > 500) { + this.timeStamp = newTimeStamp; onChange(file); } } protected abstract void onChange(File file); -}
\ No newline at end of file +} |