Merge branch '2.0.x'
This commit is contained in:
@@ -125,8 +125,7 @@ public class FileSystemWatcher {
|
||||
*/
|
||||
public void addSourceFolder(File folder) {
|
||||
Assert.notNull(folder, "Folder must not be null");
|
||||
Assert.isTrue(folder.isDirectory(),
|
||||
"Folder '" + folder + "' must exist and must" + " be a directory");
|
||||
Assert.isTrue(!folder.isFile(), "Folder '" + folder + "' must not be a file");
|
||||
synchronized (this.monitor) {
|
||||
checkNotStarted();
|
||||
this.folders.put(folder, null);
|
||||
|
||||
@@ -52,7 +52,7 @@ class FolderSnapshot {
|
||||
*/
|
||||
FolderSnapshot(File folder) {
|
||||
Assert.notNull(folder, "Folder must not be null");
|
||||
Assert.isTrue(folder.isDirectory(), "Folder must not be a file");
|
||||
Assert.isTrue(!folder.isFile(), "Folder '" + folder + "' must not be a file");
|
||||
this.folder = folder;
|
||||
this.time = new Date();
|
||||
Set<FileSnapshot> files = new LinkedHashSet<>();
|
||||
|
||||
Reference in New Issue
Block a user