src/macosx/classes/sun/lwawt/macosx/CAccessibility.java

Print this page

        

@@ -27,11 +27,10 @@
 
 import java.awt.*;
 import java.beans.*;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
-import java.security.PrivilegedAction;
 import java.util.*;
 import java.util.concurrent.Callable;
 
 import javax.accessibility.*;
 import javax.swing.*;

@@ -39,12 +38,18 @@
 class CAccessibility implements PropertyChangeListener {
     private static Set<String> ignoredRoles;
 
     static {
         // Need to load the native library for this code.
-        java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("awt"));
+        java.security.AccessController.doPrivileged(
+            new java.security.PrivilegedAction<Void>() {
+                public Void run() {
+                    System.loadLibrary("awt");
+                    return null;
     }
+            });
+    }
 
     static CAccessibility sAccessibility;
     static synchronized CAccessibility getAccessibility(final String[] roles) {
         if (sAccessibility != null) return sAccessibility;
         sAccessibility = new CAccessibility();