Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2015-06-03 04:59:43 -0400
committerJan Bartel2015-06-03 05:00:24 -0400
commit7c375c2bced2bb850ec37ce0694a2fe22f50fcbd (patch)
tree7ada0a46c91f7c8aa8cc5604a71c9c32eae51acd /jetty-security
parent69bf5ab46c87d7b40c12020cef03bf99e536d4cd (diff)
downloadorg.eclipse.jetty.project-7c375c2bced2bb850ec37ce0694a2fe22f50fcbd.tar.gz
org.eclipse.jetty.project-7c375c2bced2bb850ec37ce0694a2fe22f50fcbd.tar.xz
org.eclipse.jetty.project-7c375c2bced2bb850ec37ce0694a2fe22f50fcbd.zip
469241 Support more of existing Scanner behaviour for PathWatcher
Diffstat (limited to 'jetty-security')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/PropertyUserStore.java7
-rw-r--r--jetty-security/src/test/java/org/eclipse/jetty/security/PropertyUserStoreTest.java4
2 files changed, 3 insertions, 8 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/PropertyUserStore.java b/jetty-security/src/main/java/org/eclipse/jetty/security/PropertyUserStore.java
index 055bff09b6..b0aff8b2bd 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/PropertyUserStore.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/PropertyUserStore.java
@@ -329,17 +329,16 @@ public class PropertyUserStore extends AbstractLifeCycle implements PathWatcher.
{
super.doStart();
+ loadUsers();
if ( isHotReload() && (_configPath != null) )
{
this.pathWatcher = new PathWatcher();
this.pathWatcher.addFileWatch(_configPath);
this.pathWatcher.addListener(this);
+ this.pathWatcher.setNotifyExistingOnStart(false);
this.pathWatcher.start();
}
- else
- {
- loadUsers();
- }
+
}
@Override
diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/PropertyUserStoreTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/PropertyUserStoreTest.java
index 7f6ada3af4..8ae1a6d170 100644
--- a/jetty-security/src/test/java/org/eclipse/jetty/security/PropertyUserStoreTest.java
+++ b/jetty-security/src/test/java/org/eclipse/jetty/security/PropertyUserStoreTest.java
@@ -149,8 +149,6 @@ public class PropertyUserStoreTest
store.start();
- Thread.sleep(2000);
-
userCount.assertThatCount(is(3));
addAdditionalUser(usersFile,"skip: skip, roleA\n");
@@ -181,8 +179,6 @@ public class PropertyUserStoreTest
store.start();
- Thread.sleep(2000);
-
userCount.assertThatCount(is(4));
// rewrite file with original 3 users

Back to the top