src/java.base/solaris/classes/sun/nio/fs/SolarisWatchService.java
changeset 55693 9a97b1393e72
parent 47216 71c04702a3d5
equal deleted inserted replaced
55692:64330bbb9be5 55693:9a97b1393e72
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package sun.nio.fs;
    26 package sun.nio.fs;
    27 
    27 
    28 import java.nio.file.*;
    28 import java.nio.file.*;
    29 import java.security.AccessController;
       
    30 import java.security.PrivilegedAction;
       
    31 import java.util.*;
    29 import java.util.*;
    32 import java.io.IOException;
    30 import java.io.IOException;
    33 import jdk.internal.misc.Unsafe;
    31 import jdk.internal.misc.Unsafe;
    34 
    32 
    35 import static sun.nio.fs.UnixConstants.*;
    33 import static sun.nio.fs.UnixConstants.*;
   815 
   813 
   816     private static native int portGetn(int port, long address, int max)
   814     private static native int portGetn(int port, long address, int max)
   817         throws UnixException;
   815         throws UnixException;
   818 
   816 
   819     static {
   817     static {
   820         AccessController.doPrivileged(new PrivilegedAction<Void>() {
   818         jdk.internal.loader.BootLoader.loadLibrary("nio");
   821             public Void run() {
       
   822                 System.loadLibrary("nio");
       
   823                 return null;
       
   824         }});
       
   825         init();
   819         init();
   826     }
   820     }
   827 }
   821 }