Skip to content

Commit

Permalink
Merge pull request playframework#1013 from xael-fry/1008_detectChange
Browse files Browse the repository at this point in the history
[playframework#1008] fix(ConfigurationChangeWatcherPlugin): initialized configLastModified on application start
  • Loading branch information
xael-fry authored Oct 21, 2016
2 parents d396810 + 2c995e0 commit 8bfee9e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions framework/src/play/ConfigurationChangeWatcherPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
* Plugin used for tracking for application.conf changes
*/
public class ConfigurationChangeWatcherPlugin extends PlayPlugin {
protected static long configLastModified;
protected static long configLastModified = System.currentTimeMillis();

@Override
public void onConfigurationRead() {
public void onApplicationStart() {
configLastModified = System.currentTimeMillis();
}

@Override
public void onConfigurationRead() {
if (Play.mode.isProd()) {
Play.pluginCollection.disablePlugin(this);
}
Expand Down

0 comments on commit 8bfee9e

Please # to comment.