< prev index next >

src/java.base/windows/classes/sun/nio/fs/WindowsWatchService.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 33,43 **** import java.nio.file.WatchKey; import java.util.HashMap; import java.util.Map; import java.util.Set; - import com.sun.nio.file.ExtendedWatchEventModifier; import jdk.internal.misc.Unsafe; import static sun.nio.fs.WindowsNativeDispatcher.*; import static sun.nio.fs.WindowsConstants.*; --- 33,42 ----
*** 340,359 **** WindowsPath dir = (WindowsPath)obj; boolean watchSubtree = false; // FILE_TREE modifier allowed for (WatchEvent.Modifier modifier: modifiers) { ! if (modifier == ExtendedWatchEventModifier.FILE_TREE) { watchSubtree = true; } else { if (modifier == null) return new NullPointerException(); ! if (modifier instanceof com.sun.nio.file.SensitivityWatchEventModifier) ! continue; // ignore return new UnsupportedOperationException("Modifier not supported"); } } // open directory long handle; try { handle = CreateFile(dir.getPathForWin32Calls(), --- 339,360 ---- WindowsPath dir = (WindowsPath)obj; boolean watchSubtree = false; // FILE_TREE modifier allowed for (WatchEvent.Modifier modifier: modifiers) { ! if (ExtendedOptions.FILE_TREE.matches(modifier)) { watchSubtree = true; } else { if (modifier == null) return new NullPointerException(); ! if (!ExtendedOptions.SENSITIVITY_HIGH.matches(modifier) && ! !ExtendedOptions.SENSITIVITY_MEDIUM.matches(modifier) && ! !ExtendedOptions.SENSITIVITY_LOW.matches(modifier)) { return new UnsupportedOperationException("Modifier not supported"); } } + } // open directory long handle; try { handle = CreateFile(dir.getPathForWin32Calls(),
< prev index next >