Skip to content

Commit

Permalink
Issue #5830 Remove com.sun.nio.file import.
Browse files Browse the repository at this point in the history
This is acheived by using the 3-arg Class.forName() method call.
The bnd tool which generates the osgi manifests doesn't seem to
include Import-Package statements for the 3-arg method call, but
does for the 1-arg method call. The speculative loading of the
com.sun.nio.file.SensitivityWatchEventModifier will probably be
removed in jetty-10 onwards.

Signed-off-by: Jan Bartel <janb@webtide.com>
  • Loading branch information
janbartel committed Dec 22, 2020
1 parent ea24a81 commit afaa345
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -948,7 +948,7 @@ private void createWatchService() throws IOException
{
nativeService = false;
LOG.info("Using Non-Native Java {}", pollingWatchServiceClass.getName());
Class<?> c = Class.forName("com.sun.nio.file.SensitivityWatchEventModifier");
Class<?> c = Class.forName("com.sun.nio.file.SensitivityWatchEventModifier", false, cl);
Field f = c.getField("HIGH");
modifiers = new WatchEvent.Modifier[]
{
Expand Down

0 comments on commit afaa345

Please sign in to comment.