Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ public final Void call() throws IOException
try
{
final WatchKey key = watcher.take();
final Path watchable = (Path) key.watchable();
onPathChanged(watchable);
if (key != null)
{
final Path watchable = (Path) key.watchable();
onPathChanged(watchable);
}
}
catch (InterruptedException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ private WatchKey registerImpl(
private WatchKey takeImpl() throws InterruptedException
{
WatchKey watchKey = watcher.take();
CompoundWatchKey compoundKey = compoundKeys.get(watchKey);

return compoundKey;
return compoundKeys.get(watchKey);
}

private final class CompoundWatchKey implements WatchKey
Expand Down
Loading