Skip to content

Commit 10692a7

Browse files
committed
Reduce visibility of internal methods to package-private
1 parent 1c5742e commit 10692a7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/main/java/engineering/swat/watch/impl/mac/MacWatchKey.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class MacWatchKey implements WatchKey {
5353
private volatile boolean signalled = false; // `!signalled` means "ready"
5454
private volatile boolean cancelled = false;
5555

56-
public MacWatchKey(MacWatchable watchable, MacWatchService service) throws IOException {
56+
MacWatchKey(MacWatchable watchable, MacWatchService service) throws IOException {
5757
this.watchable = watchable;
5858
this.service = service;
5959
this.pendingEvents = new LinkedBlockingQueue<>();
@@ -69,7 +69,7 @@ public MacWatchKey(MacWatchable watchable, MacWatchService service) throws IOExc
6969
*
7070
* @return This watch key
7171
*/
72-
public MacWatchKey initialize(Kind<?>[] kinds, Modifier[] modifiers) throws IOException {
72+
MacWatchKey initialize(Kind<?>[] kinds, Modifier[] modifiers) throws IOException {
7373
if (isValid()) {
7474
config = new Configuration(kinds, modifiers);
7575
stream.open();

src/main/java/engineering/swat/watch/impl/mac/MacWatchService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
import org.checkerframework.checker.nullness.qual.Nullable;
3939

4040
public class MacWatchService implements WatchService {
41-
protected final BlockingQueue<MacWatchKey> pendingKeys = new LinkedBlockingQueue<>();
42-
protected volatile boolean closed = false;
41+
final BlockingQueue<MacWatchKey> pendingKeys = new LinkedBlockingQueue<>();
42+
volatile boolean closed = false;
4343

44-
public boolean offer(MacWatchKey key) {
44+
boolean offer(MacWatchKey key) {
4545
return pendingKeys.offer(key);
4646
}
4747

48-
public boolean isClosed() {
48+
boolean isClosed() {
4949
return closed;
5050
}
5151

src/main/java/engineering/swat/watch/impl/mac/MacWatchable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ class MacWatchable implements Watchable {
4646
private final Path path;
4747
private final Map<MacWatchService, MacWatchKey> registrations;
4848

49-
public MacWatchable(Path path) {
49+
MacWatchable(Path path) {
5050
this.path = path;
5151
this.registrations = new ConcurrentHashMap<>();
5252
}
5353

54-
public Path getPath() {
54+
Path getPath() {
5555
return path;
5656
}
5757

58-
public void unregister(MacWatchService watcher) {
58+
void unregister(MacWatchService watcher) {
5959
registrations.remove(watcher);
6060
}
6161

0 commit comments

Comments
 (0)