IJPL-162726 IJent: implement forgotten methods, protect from NPE

(cherry picked from commit db932a499a925944f75ea10cdfb0e6cbcb070b7f)

IJ-CR-148204

GitOrigin-RevId: 4b83ac7a5674ad5417a15b27debb4ed6a3466144
This commit is contained in:
Vladimir Lagunov
2024-10-31 10:15:00 +01:00
committed by intellij-monorepo-bot
parent ec67b91582
commit 9a75bab3ef

View File

@@ -25,16 +25,21 @@ class MultiRoutingWatchServiceDelegate implements WatchService {
@Override
public WatchKey poll() {
WatchKey watchKey = myDelegate.poll();
if (watchKey == null) return null;
return new MultiRoutingWatchKeyDelegate(watchKey, myProvider);
}
@Override
public WatchKey poll(long timeout, TimeUnit unit) throws InterruptedException {
return null;
WatchKey watchKey = myDelegate.poll(timeout, unit);
if (watchKey == null) return null;
return new MultiRoutingWatchKeyDelegate(watchKey, myProvider);
}
@Override
public WatchKey take() throws InterruptedException {
return null;
WatchKey watchKey = myDelegate.take();
if (watchKey == null) return null;
return new MultiRoutingWatchKeyDelegate(watchKey, myProvider);
}
}