eppleton commented on code in PR #9820:
URL: https://github.com/apache/netbeans/pull/9820#discussion_r4655111566


##########
platform/openide.filesystems/src/org/openide/filesystems/FileUtil.java:
##########
@@ -837,12 +837,22 @@ public static File toFile(FileObject fo) {
      * If not possible then null is returned.
      * This is the inverse operation of {@link #toFileObject}.
      * @param fo FileObject whose corresponding Path will be looked for
-     * @return java.nio.file.Path or null if no corresponding File exists.
+     * @return java.nio.file.Path for the FileObject
      * @since 9.32
      */
     public static Path toPath(FileObject fo) {
+        Parameters.notNull("fo", fo);
         File f = toFile(fo);
-        return f != null ? f.toPath() : null;
+        if (f != null) {
+            return f.toPath();
+        }
+        try {
+            org.openide.filesystems.FileSystem fs = fo.getFileSystem();
+            NioFsForFileSystem nioFs = new NioFsForFileSystem(fs);

Review Comment:
   A new `NioFsForFileSystem` is created on every `toPath()` call, and 
`NioPathForFileObject.equals`, `startsWith`, `endsWith` and `relativize` 
compare `fileSystem` by identity. So for a file inside a JAR, 
`toPath(fo).equals(toPath(fo))` is false, the hash codes differ, and 
`toPath(folder).relativize(toPath(file))` throws "Cannot relativize different 
file systems". The tests don't notice because they always derive paths from one 
`toPath()` result. Caching one NIO filesystem per 
`org.openide.filesystems.FileSystem` (e.g. weakly), or comparing the underlying 
FileSystem, would fix that.



##########
platform/openide.filesystems/src/org/openide/filesystems/FileUtil.java:
##########
@@ -837,12 +837,22 @@ public static File toFile(FileObject fo) {
      * If not possible then null is returned.

Review Comment:
   The javadoc still says "If not possible then null is returned", which 
contradicts the new `@return`.



##########
platform/openide.filesystems/src/org/netbeans/modules/openide/filesystems/declmime/NioFileTypeDetector.java:
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.openide.filesystems.declmime;
+
+import java.nio.file.Path;
+import java.nio.file.spi.FileTypeDetector;
+
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.lookup.ServiceProvider;
+
+@ServiceProvider(service = FileTypeDetector.class, position = 100)

Review Comment:
   `Files.probeContentType` loads installed detectors with 
`ServiceLoader.load(FileTypeDetector.class, 
ClassLoader.getSystemClassLoader())` (checked in the JDK 21 sources). In unit 
tests the module is on the system classpath, so this works. In the running IDE, 
`openide.filesystems` lives in `platform/core` and is loaded by 
`MainImpl.BootClassLoader`, not the system classloader, so I'd expect this 
detector never to be found there. Also, it's registered globally, so it would 
be asked about every `Path` in the JVM, not just the virtual ones; returning 
`null` early for non-`NioPathForFileObject` paths would keep it out of the way.



##########
platform/openide.filesystems/src/org/openide/filesystems/NioPathForFileObject.java:
##########
@@ -0,0 +1,366 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openide.filesystems;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.nio.file.InvalidPathException;
+import java.nio.file.LinkOption;
+import java.nio.file.Path;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+
+final class NioPathForFileObject implements Path {
+    private final FileObject fileObject;
+    private final NioFsForFileSystem fileSystem;
+    private final String name;
+    private final boolean absolute;
+
+    private NioPathForFileObject(FileObject fileObject, NioFsForFileSystem 
fileSystem, String name) {
+        this(fileObject, fileSystem, name, true);
+    }
+
+    private NioPathForFileObject(FileObject fileObject, NioFsForFileSystem 
fileSystem, String name, boolean absolute) {
+        this.fileObject = fileObject;
+        this.fileSystem = fileSystem;
+        this.name = normalize(name);
+        this.absolute = absolute;
+    }
+
+    static NioPathForFileObject create(FileObject fileObject, 
NioFsForFileSystem fileSystem) {
+        return new NioPathForFileObject(fileObject, fileSystem, 
fullName(fileObject));
+    }
+
+    static NioPathForFileObject create(FileObject fileObject, 
NioFsForFileSystem fileSystem, String name) {
+        return new NioPathForFileObject(fileObject, fileSystem, name);
+    }
+
+    static NioPathForFileObject relative(FileObject fileObject, 
NioFsForFileSystem fileSystem, String name) {
+        return new NioPathForFileObject(fileObject, fileSystem, name, false);
+    }
+
+    FileObject getFileObject() {
+        return fileObject;
+    }
+
+    @Override
+    public java.nio.file.FileSystem getFileSystem() {
+        return fileSystem;
+    }
+
+    @Override
+    public boolean isAbsolute() {
+        return absolute;
+    }
+
+    @Override
+    public Path getRoot() {
+        return create(fileSystem.getFileSystem().getRoot(), fileSystem);
+    }
+
+    @Override
+    public Path getFileName() {
+        if (name.isEmpty()) {
+            return null;
+        }
+        int separator = name.lastIndexOf('/');
+        String fileName = separator == -1 ? name : name.substring(separator + 
1);
+        return fileName.isEmpty() ? null : relative(fileObject, fileSystem, 
fileName);
+    }
+
+    @Override
+    public Path getParent() {
+        if (name.isEmpty()) {
+            return null;
+        }
+        int separator = name.lastIndexOf('/');
+        if (separator == -1) {
+            return getRoot();
+        }
+        String parentName = name.substring(0, separator);
+        FileObject parent = 
fileSystem.getFileSystem().findResource(parentName);
+        if (parent == null && fileObject != null) {
+            parent = fileObject.getParent();
+        }
+        return create(parent, fileSystem, parentName);
+    }
+
+    @Override
+    public int getNameCount() {
+        if (name.isEmpty()) {
+            return 1;
+        }
+        int count = 0;
+        for (String part : name.split("/")) {
+            if (!part.isEmpty()) {
+                count++;
+            }
+        }
+        return count;
+    }
+
+    @Override
+    public Path getName(int index) {
+        if (index < 0 || index >= getNameCount()) {
+            throw new IllegalArgumentException("Illegal name index: " + index);
+        }
+        List<String> names = names();
+        return relative(null, fileSystem, names.get(index));
+    }
+
+    @Override
+    public Path subpath(int beginIndex, int endIndex) {
+        if (beginIndex < 0 || endIndex > getNameCount() || beginIndex >= 
endIndex) {
+            throw new IllegalArgumentException();
+        }
+        List<String> names = names();
+        return relative(null, fileSystem, String.join("/", 
names.subList(beginIndex, endIndex)));
+    }
+
+    @Override
+    public boolean startsWith(Path other) {
+        if (!(other instanceof NioPathForFileObject nio) || nio.fileSystem != 
fileSystem) {
+            return false;
+        }
+        if (nio.name.isEmpty()) {
+            return absolute;
+        }
+        return name.equals(nio.name) || name.startsWith(nio.name + "/");
+    }
+
+    @Override
+    public boolean startsWith(String other) {
+        return startsWith(fileSystem.getPath(other));
+    }
+
+    @Override
+    public boolean endsWith(Path other) {
+        if (!(other instanceof NioPathForFileObject nio) || nio.fileSystem != 
fileSystem) {
+            return false;
+        }
+        return name.equals(nio.name) || name.endsWith("/" + nio.name) || 
name.endsWith(nio.name);
+    }
+
+    @Override
+    public boolean endsWith(String other) {
+        return endsWith(fileSystem.getPath(other));
+    }
+
+    @Override
+    public Path normalize() {
+        List<String> normalized = new ArrayList<>();
+        for (String part : names()) {
+            if (part.isEmpty() || part.equals(".")) {
+                continue;
+            }
+            if (part.equals("..")) {
+                if (!normalized.isEmpty()) {
+                    normalized.remove(normalized.size() - 1);
+                }
+            } else {
+                normalized.add(part);
+            }
+        }
+        String normalizedName = String.join("/", normalized);
+        FileObject fo = 
fileSystem.getFileSystem().findResource(normalizedName);
+        return create(fo, fileSystem, normalizedName);
+    }
+
+    @Override
+    public Path resolve(Path other) {
+        if (other.isAbsolute()) {
+            return other;
+        }
+        if (!(other instanceof NioPathForFileObject nio)) {
+            return resolve(other.toString());
+        }
+        return resolve(nio.name);
+    }
+
+    @Override
+    public Path resolve(String other) {
+        if (other.isEmpty()) {
+            return this;
+        }
+        String result = name.isEmpty() ? normalize(other) : normalize(name + 
"/" + other);
+        FileObject fo = fileSystem.getFileSystem().findResource(result);
+        return create(fo, fileSystem, result);
+    }
+
+    @Override
+    public Path resolveSibling(Path other) {
+        if (other.isAbsolute()) {
+            return other;
+        }
+        Path parent = getParent();
+        return parent == null ? other : parent.resolve(other);
+    }
+
+    @Override
+    public Path resolveSibling(String other) {
+        return resolveSibling(fileSystem.getPath(other));
+    }
+
+    @Override
+    public Path relativize(Path other) {
+        if (!(other instanceof NioPathForFileObject nio) || nio.fileSystem != 
fileSystem) {
+            throw new IllegalArgumentException("Cannot relativize different 
file systems");
+        }
+        List<String> base = names();
+        List<String> target = nio.names();
+        int common = 0;
+        while (common < base.size() && common < target.size() && 
base.get(common).equals(target.get(common))) {
+            common++;
+        }
+        List<String> result = new ArrayList<>();
+        for (int i = common; i < base.size(); i++) {
+            result.add("..");
+        }
+        result.addAll(target.subList(common, target.size()));
+        String relative = String.join("/", result);
+        return relative(null, fileSystem, relative.isEmpty() ? "" : relative);
+    }
+
+    @Override
+    public URI toUri() {
+        String path = name.isEmpty() ? "/" : "/" + name;
+        return URI.create("openide://" + 
fileSystem.getFileSystem().getDisplayName() + path);

Review Comment:
   `toUri()` concatenates the filesystem display name without escaping. For a 
`JarFileSystem` the display name is the JAR's absolute path, so `URI.create` 
throws `IllegalArgumentException` when that path contains a space 
(`openide:///home/u/my lib.jar/...`) or is a Windows path (backslashes in the 
authority). I checked both strings in jshell. Even when it parses, the JAR path 
is merged into the URI path, so `NioPathProvider.getPath(uri)` can't round-trip 
it. Maybe `fo.toURI()` (the `jar:file:...!/` form) would be a better fit?



##########
platform/openide.filesystems/src/org/openide/filesystems/NioPathForFileObject.java:
##########
@@ -0,0 +1,366 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openide.filesystems;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.nio.file.InvalidPathException;
+import java.nio.file.LinkOption;
+import java.nio.file.Path;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+
+final class NioPathForFileObject implements Path {
+    private final FileObject fileObject;
+    private final NioFsForFileSystem fileSystem;
+    private final String name;
+    private final boolean absolute;
+
+    private NioPathForFileObject(FileObject fileObject, NioFsForFileSystem 
fileSystem, String name) {
+        this(fileObject, fileSystem, name, true);
+    }
+
+    private NioPathForFileObject(FileObject fileObject, NioFsForFileSystem 
fileSystem, String name, boolean absolute) {
+        this.fileObject = fileObject;
+        this.fileSystem = fileSystem;
+        this.name = normalize(name);
+        this.absolute = absolute;
+    }
+
+    static NioPathForFileObject create(FileObject fileObject, 
NioFsForFileSystem fileSystem) {
+        return new NioPathForFileObject(fileObject, fileSystem, 
fullName(fileObject));
+    }
+
+    static NioPathForFileObject create(FileObject fileObject, 
NioFsForFileSystem fileSystem, String name) {
+        return new NioPathForFileObject(fileObject, fileSystem, name);
+    }
+
+    static NioPathForFileObject relative(FileObject fileObject, 
NioFsForFileSystem fileSystem, String name) {
+        return new NioPathForFileObject(fileObject, fileSystem, name, false);
+    }
+
+    FileObject getFileObject() {
+        return fileObject;
+    }
+
+    @Override
+    public java.nio.file.FileSystem getFileSystem() {
+        return fileSystem;
+    }
+
+    @Override
+    public boolean isAbsolute() {
+        return absolute;
+    }
+
+    @Override
+    public Path getRoot() {
+        return create(fileSystem.getFileSystem().getRoot(), fileSystem);
+    }
+
+    @Override
+    public Path getFileName() {
+        if (name.isEmpty()) {
+            return null;
+        }
+        int separator = name.lastIndexOf('/');
+        String fileName = separator == -1 ? name : name.substring(separator + 
1);
+        return fileName.isEmpty() ? null : relative(fileObject, fileSystem, 
fileName);
+    }
+
+    @Override
+    public Path getParent() {
+        if (name.isEmpty()) {
+            return null;
+        }
+        int separator = name.lastIndexOf('/');
+        if (separator == -1) {
+            return getRoot();
+        }
+        String parentName = name.substring(0, separator);
+        FileObject parent = 
fileSystem.getFileSystem().findResource(parentName);
+        if (parent == null && fileObject != null) {
+            parent = fileObject.getParent();
+        }
+        return create(parent, fileSystem, parentName);
+    }
+
+    @Override
+    public int getNameCount() {
+        if (name.isEmpty()) {
+            return 1;
+        }
+        int count = 0;
+        for (String part : name.split("/")) {
+            if (!part.isEmpty()) {
+                count++;
+            }
+        }
+        return count;
+    }
+
+    @Override
+    public Path getName(int index) {
+        if (index < 0 || index >= getNameCount()) {
+            throw new IllegalArgumentException("Illegal name index: " + index);
+        }
+        List<String> names = names();
+        return relative(null, fileSystem, names.get(index));
+    }
+
+    @Override
+    public Path subpath(int beginIndex, int endIndex) {
+        if (beginIndex < 0 || endIndex > getNameCount() || beginIndex >= 
endIndex) {
+            throw new IllegalArgumentException();
+        }
+        List<String> names = names();
+        return relative(null, fileSystem, String.join("/", 
names.subList(beginIndex, endIndex)));
+    }
+
+    @Override
+    public boolean startsWith(Path other) {
+        if (!(other instanceof NioPathForFileObject nio) || nio.fileSystem != 
fileSystem) {
+            return false;
+        }
+        if (nio.name.isEmpty()) {
+            return absolute;
+        }
+        return name.equals(nio.name) || name.startsWith(nio.name + "/");
+    }
+
+    @Override
+    public boolean startsWith(String other) {
+        return startsWith(fileSystem.getPath(other));
+    }
+
+    @Override
+    public boolean endsWith(Path other) {
+        if (!(other instanceof NioPathForFileObject nio) || nio.fileSystem != 
fileSystem) {
+            return false;
+        }
+        return name.equals(nio.name) || name.endsWith("/" + nio.name) || 
name.endsWith(nio.name);

Review Comment:
   `name.endsWith(nio.name)` makes `dir/file.txt` end with `le.txt`. 
`Path.endsWith` compares whole name elements, so the third alternative should 
go; the first two already cover the valid cases.



##########
platform/openide.filesystems/src/org/openide/filesystems/NioPathProvider.java:
##########
@@ -0,0 +1,357 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openide.filesystems;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.nio.channels.SeekableByteChannel;
+import java.nio.ByteBuffer;
+import java.nio.file.AccessDeniedException;
+import java.nio.file.AccessMode;
+import java.nio.file.CopyOption;
+import java.nio.file.DirectoryStream;
+import java.nio.file.FileStore;
+import java.nio.file.FileSystem;
+import java.nio.file.LinkOption;
+import java.nio.file.NoSuchFileException;
+import java.nio.file.OpenOption;
+import java.nio.file.Path;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.nio.file.attribute.FileAttribute;
+import java.nio.file.attribute.FileTime;
+import java.nio.file.spi.FileSystemProvider;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+final class NioPathProvider extends FileSystemProvider {
+    private final NioFsForFileSystem fileSystem;
+
+    NioPathProvider(NioFsForFileSystem fileSystem) {
+        this.fileSystem = fileSystem;
+    }
+
+    @Override
+    public String getScheme() {
+        return "openide";
+    }
+
+    @Override
+    public FileSystem newFileSystem(URI uri, Map<String, ?> env) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public FileSystem getFileSystem(URI uri) {
+        return fileSystem;
+    }
+
+    @Override
+    public Path getPath(URI uri) {
+        String path = uri.getPath();
+        return fileSystem.getPath(path);
+    }
+
+    @Override
+    public SeekableByteChannel newByteChannel(
+            Path path, Set<? extends OpenOption> options, FileAttribute<?>... 
attrs) throws IOException {
+        if (options.stream().anyMatch(option ->
+                option == java.nio.file.StandardOpenOption.WRITE
+                || option == java.nio.file.StandardOpenOption.APPEND
+                || option == java.nio.file.StandardOpenOption.CREATE
+                || option == java.nio.file.StandardOpenOption.CREATE_NEW)) {
+            throw new AccessDeniedException(path.toString(), null, "The 
filesystem is read-only");

Review Comment:
   All write operations report "The filesystem is read-only", regardless of 
`FileSystem.isReadOnly()`. For writable virtual filesystems (a 
`MemoryFileSystem`, or config files in the system filesystem, where 
`FileUtil.toFile` is null), `Files.writeString(FileUtil.toPath(fo), ...)` would 
fail even though the `FileObject` can be written. Similarly 
`getFileAttributeView` returns `null`, so e.g. `Files.setLastModifiedTime` 
would NPE. Fine for a first step, but worth either implementing or documenting.



##########
platform/openide.filesystems/src/org/openide/filesystems/NioWatchService.java:
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.openide.filesystems;
+
+import java.io.IOException;
+import java.nio.file.ClosedWatchServiceException;
+import java.nio.file.Path;
+import java.nio.file.StandardWatchEventKinds;
+import java.nio.file.Watchable;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+
+final class NioWatchService implements WatchService {
+    private final BlockingQueue<WatchKey> keys = new LinkedBlockingQueue<>();
+    private boolean closed;
+
+    WatchKey register(Path path, WatchEvent.Kind<?>[] events) {
+        NioWatchKey key = new NioWatchKey(this, path, events);
+        return key;
+    }
+
+    @Override
+    public WatchKey poll() throws ClosedWatchServiceException {
+        checkClosed();
+        return keys.poll();
+    }
+
+    @Override
+    public WatchKey poll(long timeout, TimeUnit unit)
+            throws ClosedWatchServiceException, InterruptedException {
+        checkClosed();
+        return keys.poll(timeout, unit);
+    }
+
+    @Override
+    public WatchKey take() throws ClosedWatchServiceException, 
InterruptedException {
+        checkClosed();
+        return keys.take();
+    }
+
+    @Override
+    public void close() {
+        closed = true;
+    }
+
+    void checkClosed() {
+        if (closed) {
+            throw new ClosedWatchServiceException();
+        }
+    }
+
+    private static final class NioWatchKey implements WatchKey {
+        private final NioWatchService service;
+        private final Path path;
+        private final WatchEvent.Kind<?>[] events;
+        private boolean valid = true;
+
+        NioWatchKey(NioWatchService service, Path path, WatchEvent.Kind<?>[] 
events) {
+            this.service = service;
+            this.path = path;
+            this.events = events.clone();
+        }
+
+        @Override
+        public boolean isValid() {
+            return valid && !service.closed;
+        }
+
+        @Override
+        public List<WatchEvent<?>> pollEvents() {
+            return new ArrayList<>();

Review Comment:
   `pollEvents()` always returns an empty list and nothing is ever queued, so a 
registered watcher silently never fires. Bridging to a `FileChangeListener` on 
the `FileObject` seems natural; until then, throwing 
`UnsupportedOperationException` from `register` might be more honest than a 
watcher that never fires.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to