File tree 3 files changed +7
-3
lines changed
src/main/java/engineering/swat/watch/impl
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 56
56
import com .sun .nio .file .ExtendedWatchEventModifier ;
57
57
58
58
import engineering .swat .watch .impl .mac .MacWatchService ;
59
- import engineering .swat .watch .impl .mac .MacWatchable ;
60
59
import engineering .swat .watch .impl .util .SubscriptionKey ;
61
60
62
61
/**
@@ -173,7 +172,7 @@ public WatchService newWatchService() throws IOException {
173
172
}
174
173
@ Override
175
174
public Watchable newWatchable (Path path ) {
176
- return new MacWatchable (path );
175
+ return MacWatchService . newWatchable (path );
177
176
}
178
177
};
179
178
Original file line number Diff line number Diff line change 28
28
29
29
import java .io .IOException ;
30
30
import java .nio .file .ClosedWatchServiceException ;
31
+ import java .nio .file .Path ;
31
32
import java .nio .file .WatchKey ;
32
33
import java .nio .file .WatchService ;
33
34
import java .util .concurrent .BlockingQueue ;
@@ -48,6 +49,10 @@ public boolean isClosed() {
48
49
return closed ;
49
50
}
50
51
52
+ public static MacWatchable newWatchable (Path path ) {
53
+ return new MacWatchable (path );
54
+ }
55
+
51
56
// -- WatchService --
52
57
53
58
@ Override
Original file line number Diff line number Diff line change 42
42
import java .util .function .Function ;
43
43
import java .util .stream .Stream ;
44
44
45
- public class MacWatchable implements Watchable {
45
+ class MacWatchable implements Watchable {
46
46
private final Path path ;
47
47
private final Map <MacWatchService , MacWatchKey > registrations ;
48
48
You can’t perform that action at this time.
0 commit comments