jdk/test/java/nio/file/WatchService/WithSecurityManager.java
changeset 9679 d98ae8bc45fc
parent 5506 202f599c92aa
child 14342 8435a30053c1
equal deleted inserted replaced
9677:638762c0263e 9679:d98ae8bc45fc
    64         }
    64         }
    65 
    65 
    66         // attempt to register directory
    66         // attempt to register directory
    67         try {
    67         try {
    68             dir.register(dir.getFileSystem().newWatchService(),
    68             dir.register(dir.getFileSystem().newWatchService(),
    69                          new WatchEvent.Kind<?>[]{ StandardWatchEventKind.ENTRY_CREATE },
    69                          new WatchEvent.Kind<?>[]{ StandardWatchEventKinds.ENTRY_CREATE },
    70                          modifiers);
    70                          modifiers);
    71             if (expectedToFail)
    71             if (expectedToFail)
    72                 throw new RuntimeException("SecurityException not thrown");
    72                 throw new RuntimeException("SecurityException not thrown");
    73         } catch (SecurityException e) {
    73         } catch (SecurityException e) {
    74             if (!expectedToFail)
    74             if (!expectedToFail)