src/share/classes/sun/nio/fs/AbstractPoller.java

Print this page

        

*** 90,110 **** abstract void implCloseAll(); /** * Requests, and waits on, poller thread to register given file. */ ! final WatchKey register(FileRef dir, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException { // validate arguments before request to poller if (dir == null) throw new NullPointerException(); if (events.length == 0) throw new IllegalArgumentException("No events to register"); ! Set<WatchEvent.Kind<?>> eventSet = new HashSet<WatchEvent.Kind<?>>(events.length); for (WatchEvent.Kind<?> event: events) { // standard events if (event == StandardWatchEventKind.ENTRY_CREATE || event == StandardWatchEventKind.ENTRY_MODIFY || event == StandardWatchEventKind.ENTRY_DELETE) --- 90,110 ---- abstract void implCloseAll(); /** * Requests, and waits on, poller thread to register given file. */ ! final WatchKey register(Path dir, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException { // validate arguments before request to poller if (dir == null) throw new NullPointerException(); if (events.length == 0) throw new IllegalArgumentException("No events to register"); ! Set<WatchEvent.Kind<?>> eventSet = new HashSet<>(events.length); for (WatchEvent.Kind<?> event: events) { // standard events if (event == StandardWatchEventKind.ENTRY_CREATE || event == StandardWatchEventKind.ENTRY_MODIFY || event == StandardWatchEventKind.ENTRY_DELETE)