--- old/src/macosx/classes/apple/launcher/JavaAppLauncher.java Wed Apr 25 15:21:14 2012 +++ new/src/macosx/classes/apple/launcher/JavaAppLauncher.java Wed Apr 25 15:21:13 2012 @@ -27,7 +27,6 @@ import java.io.*; import java.lang.reflect.*; -import java.security.PrivilegedAction; import java.text.MessageFormat; import java.util.*; import java.util.jar.*; @@ -36,7 +35,13 @@ class JavaAppLauncher implements Runnable { static { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("osx")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osx"); + return null; + } + }); } private static native T nativeConvertAndRelease(final long ptr); --- old/src/macosx/classes/apple/security/KeychainStore.java Wed Apr 25 15:21:15 2012 +++ new/src/macosx/classes/apple/security/KeychainStore.java Wed Apr 25 15:21:14 2012 @@ -103,7 +103,13 @@ private static final int SALT_LEN = 20; static { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("osx")); + AccessController.doPrivileged( + new PrivilegedAction() { + public Void run() { + System.loadLibrary("osx"); + return null; + } + }); try { PKCS8ShroudedKeyBag_OID = new ObjectIdentifier(keyBag); pbeWithSHAAnd3KeyTripleDESCBC_OID = new ObjectIdentifier(pbeWithSHAAnd3KeyTripleDESCBC); --- old/src/macosx/classes/com/apple/concurrent/LibDispatchNative.java Wed Apr 25 15:21:16 2012 +++ new/src/macosx/classes/com/apple/concurrent/LibDispatchNative.java Wed Apr 25 15:21:15 2012 @@ -26,17 +26,23 @@ package com.apple.concurrent; final class LibDispatchNative { - static { - java.security.AccessController.doPrivileged((java.security.PrivilegedAction)new sun.security.action.LoadLibraryAction("osx")); + static { + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osx"); + return null; + } + }); } - static native boolean nativeIsDispatchSupported(); - static native long nativeGetMainQueue(); - static native long nativeCreateConcurrentQueue(int priority); - static native long nativeCreateSerialQueue(String name); - static native void nativeReleaseQueue(long nativeQueue); - static native void nativeExecuteAsync(long nativeQueue, Runnable task); - static native void nativeExecuteSync(long nativeQueue, Runnable task); + static native boolean nativeIsDispatchSupported(); + static native long nativeGetMainQueue(); + static native long nativeCreateConcurrentQueue(int priority); + static native long nativeCreateSerialQueue(String name); + static native void nativeReleaseQueue(long nativeQueue); + static native void nativeExecuteAsync(long nativeQueue, Runnable task); + static native void nativeExecuteSync(long nativeQueue, Runnable task); - private LibDispatchNative() { } + private LibDispatchNative() { } } --- old/src/macosx/classes/com/apple/eawt/Application.java Wed Apr 25 15:21:17 2012 +++ new/src/macosx/classes/com/apple/eawt/Application.java Wed Apr 25 15:21:17 2012 @@ -28,7 +28,6 @@ import java.awt.*; import java.awt.peer.*; import java.beans.Beans; -import java.security.PrivilegedAction; import javax.swing.JMenuBar; @@ -59,7 +58,13 @@ static Application sApplication = null; static { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("awt")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); checkSecurity(); if (!Beans.isDesignTime()) { --- old/src/macosx/classes/com/apple/eio/FileManager.java Wed Apr 25 15:21:18 2012 +++ new/src/macosx/classes/com/apple/eio/FileManager.java Wed Apr 25 15:21:18 2012 @@ -55,7 +55,13 @@ */ public class FileManager { static { - java.security.AccessController.doPrivileged((java.security.PrivilegedAction)new sun.security.action.LoadLibraryAction("osx")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osx"); + return null; + } + }); } /** --- old/src/macosx/classes/com/apple/laf/AquaFileView.java Wed Apr 25 15:21:19 2012 +++ new/src/macosx/classes/com/apple/laf/AquaFileView.java Wed Apr 25 15:21:19 2012 @@ -26,7 +26,6 @@ package com.apple.laf; import java.io.*; -import java.security.PrivilegedAction; import java.util.*; import java.util.Map.Entry; @@ -57,7 +56,13 @@ static final int kLSItemInfoExtensionIsHidden = 0x00100000; /* Item has a hidden extension*/ static { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("osxui")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osxui"); + return null; + } + }); } // TODO: Un-comment this out when the native version exists --- old/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java Wed Apr 25 15:21:20 2012 +++ new/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java Wed Apr 25 15:21:20 2012 @@ -134,10 +134,16 @@ * @see UIManager#setLookAndFeel */ public void initialize() { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("osxui")); - java.security.AccessController.doPrivileged(new PrivilegedAction(){ + java.security.AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + System.loadLibrary("osxui"); + return null; + } + }); + + java.security.AccessController.doPrivileged(new PrivilegedAction(){ @Override - public Object run() { + public Void run() { JRSUIControl.initJRSUI(); return null; } --- old/src/macosx/classes/com/apple/laf/AquaNativeResources.java Wed Apr 25 15:21:21 2012 +++ new/src/macosx/classes/com/apple/laf/AquaNativeResources.java Wed Apr 25 15:21:21 2012 @@ -27,7 +27,6 @@ import java.awt.*; import java.awt.image.BufferedImage; -import java.security.PrivilegedAction; import javax.swing.plaf.UIResource; @@ -35,7 +34,13 @@ public class AquaNativeResources { static { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("osxui")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osxui"); + return null; + } + }); } // TODO: removing CColorPaint for now --- old/src/macosx/classes/com/apple/laf/ScreenMenu.java Wed Apr 25 15:21:23 2012 +++ new/src/macosx/classes/com/apple/laf/ScreenMenu.java Wed Apr 25 15:21:22 2012 @@ -28,7 +28,6 @@ import java.awt.*; import java.awt.event.*; import java.awt.peer.MenuComponentPeer; -import java.security.PrivilegedAction; import java.util.Hashtable; import javax.swing.*; @@ -38,7 +37,13 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, ScreenMenuPropertyHandler { static { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("awt")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); } // screen menu stuff --- old/src/macosx/classes/com/apple/laf/ScreenPopupFactory.java Wed Apr 25 15:21:24 2012 +++ new/src/macosx/classes/com/apple/laf/ScreenPopupFactory.java Wed Apr 25 15:21:23 2012 @@ -26,8 +26,6 @@ package com.apple.laf; import java.awt.*; -import java.security.PrivilegedAction; - import javax.swing.*; import sun.lwawt.macosx.CPlatformWindow; @@ -34,7 +32,13 @@ class ScreenPopupFactory extends PopupFactory { static { - java.security.AccessController.doPrivileged((PrivilegedAction)new sun.security.action.LoadLibraryAction("osxui")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osxui"); + return null; + } + }); } static final Float TRANSLUCENT = new Float(248f/255f); --- old/src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java Wed Apr 25 15:21:25 2012 +++ new/src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java Wed Apr 25 15:21:24 2012 @@ -79,7 +79,13 @@ class MacOSXPreferencesFile { static { - java.security.AccessController.doPrivileged(new sun.security.action.LoadLibraryAction("osx")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osx"); + return null; + } + }); } private class FlushTask extends TimerTask { --- old/src/macosx/classes/sun/awt/CGraphicsEnvironment.java Wed Apr 25 15:21:26 2012 +++ new/src/macosx/classes/sun/awt/CGraphicsEnvironment.java Wed Apr 25 15:21:26 2012 @@ -58,9 +58,15 @@ public static void init() { } static { - java.security.AccessController.doPrivileged(new sun.security.action.LoadLibraryAction("awt")); - java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { - public Object run() { + java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); + + java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { + public Void run() { if (isHeadless()) return null; initCocoa(); return null; --- old/src/macosx/classes/sun/lwawt/macosx/CAccessibility.java Wed Apr 25 15:21:27 2012 +++ new/src/macosx/classes/sun/lwawt/macosx/CAccessibility.java Wed Apr 25 15:21:27 2012 @@ -29,7 +29,6 @@ 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; @@ -41,7 +40,13 @@ 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() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); } static CAccessibility sAccessibility; --- old/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java Wed Apr 25 15:21:28 2012 +++ new/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java Wed Apr 25 15:21:28 2012 @@ -87,7 +87,12 @@ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("jpeg")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("jpeg"); + return null; + } + }); initReaderIDs(ImageInputStream.class, JPEGQTable.class, JPEGHuffmanTable.class); --- old/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java Wed Apr 25 15:21:29 2012 +++ new/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java Wed Apr 25 15:21:29 2012 @@ -177,7 +177,12 @@ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("jpeg")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("jpeg"); + return null; + } + }); initWriterIDs(ImageOutputStream.class, JPEGQTable.class, JPEGHuffmanTable.class); --- old/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java Wed Apr 25 15:21:31 2012 +++ new/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java Wed Apr 25 15:21:30 2012 @@ -87,7 +87,12 @@ // If loading from stand alone build uncomment this. // System.loadLibrary("unpack"); java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("unpack")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("unpack"); + return null; + } + }); initIDs(); } --- old/src/share/classes/java/awt/SplashScreen.java Wed Apr 25 15:21:32 2012 +++ new/src/share/classes/java/awt/SplashScreen.java Wed Apr 25 15:21:31 2012 @@ -119,7 +119,12 @@ // SplashScreen class is now a singleton if (!wasClosed && theInstance == null) { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("splashscreen")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("splashscreen"); + return null; + } + }); long ptr = _getInstance(); if (ptr != 0 && _isVisible(ptr)) { theInstance = new SplashScreen(ptr); --- old/src/share/classes/java/awt/Toolkit.java Wed Apr 25 15:21:33 2012 +++ new/src/share/classes/java/awt/Toolkit.java Wed Apr 25 15:21:32 2012 @@ -1646,7 +1646,12 @@ static void loadLibraries() { if (!loaded) { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); loaded = true; } } --- old/src/share/classes/java/awt/event/NativeLibLoader.java Wed Apr 25 15:21:34 2012 +++ new/src/share/classes/java/awt/event/NativeLibLoader.java Wed Apr 25 15:21:34 2012 @@ -54,6 +54,11 @@ */ static void loadLibraries() { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); } } --- old/src/share/classes/java/awt/image/ColorModel.java Wed Apr 25 15:21:35 2012 +++ new/src/share/classes/java/awt/image/ColorModel.java Wed Apr 25 15:21:35 2012 @@ -204,7 +204,12 @@ static void loadLibraries() { if (!loaded) { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); loaded = true; } } --- old/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java Wed Apr 25 15:21:36 2012 +++ new/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java Wed Apr 25 15:21:36 2012 @@ -67,7 +67,12 @@ */ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("net")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); } /** --- old/src/share/classes/java/net/AbstractPlainSocketImpl.java Wed Apr 25 15:21:38 2012 +++ new/src/share/classes/java/net/AbstractPlainSocketImpl.java Wed Apr 25 15:21:37 2012 @@ -78,7 +78,12 @@ */ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("net")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); } /** --- old/src/share/classes/java/net/DatagramPacket.java Wed Apr 25 15:21:39 2012 +++ new/src/share/classes/java/net/DatagramPacket.java Wed Apr 25 15:21:38 2012 @@ -47,7 +47,12 @@ */ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("net")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); init(); } --- old/src/share/classes/java/net/InetAddress.java Wed Apr 25 15:21:40 2012 +++ new/src/share/classes/java/net/InetAddress.java Wed Apr 25 15:21:39 2012 @@ -234,7 +234,13 @@ static { preferIPv6Address = java.security.AccessController.doPrivileged( new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue(); - AccessController.doPrivileged(new LoadLibraryAction("net")); + AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); init(); } --- old/src/share/classes/java/net/NetworkInterface.java Wed Apr 25 15:21:41 2012 +++ new/src/share/classes/java/net/NetworkInterface.java Wed Apr 25 15:21:41 2012 @@ -53,7 +53,14 @@ private static final int defaultIndex; /* index of defaultInterface */ static { - AccessController.doPrivileged(new LoadLibraryAction("net")); + AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); + init(); defaultInterface = DefaultInterface.getDefault(); if (defaultInterface != null) { --- old/src/share/classes/sun/awt/NativeLibLoader.java Wed Apr 25 15:21:42 2012 +++ new/src/share/classes/sun/awt/NativeLibLoader.java Wed Apr 25 15:21:42 2012 @@ -54,6 +54,11 @@ */ static void loadLibraries() { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); } } --- old/src/share/classes/sun/awt/image/JPEGImageDecoder.java Wed Apr 25 15:21:43 2012 +++ new/src/share/classes/sun/awt/image/JPEGImageDecoder.java Wed Apr 25 15:21:43 2012 @@ -54,7 +54,12 @@ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("jpeg")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("jpeg"); + return null; + } + }); initIDs(InputStreamClass); RGBcolormodel = new DirectColorModel(24, 0xff0000, 0xff00, 0xff); ARGBcolormodel = ColorModel.getRGBdefault(); --- old/src/share/classes/sun/awt/image/NativeLibLoader.java Wed Apr 25 15:21:44 2012 +++ new/src/share/classes/sun/awt/image/NativeLibLoader.java Wed Apr 25 15:21:44 2012 @@ -53,7 +53,12 @@ * that the name of the library is "awt". -br. */ static void loadLibraries() { - java.security.AccessController.doPrivileged - (new sun.security.action.LoadLibraryAction("awt")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); } } --- old/src/share/classes/sun/java2d/Disposer.java Wed Apr 25 15:21:46 2012 +++ new/src/share/classes/sun/java2d/Disposer.java Wed Apr 25 15:21:45 2012 @@ -57,7 +57,12 @@ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); initIDs(); String type = (String) java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction("sun.java2d.reftype")); --- old/src/share/classes/sun/management/ManagementFactoryHelper.java Wed Apr 25 15:21:47 2012 +++ new/src/share/classes/sun/management/ManagementFactoryHelper.java Wed Apr 25 15:21:46 2012 @@ -37,7 +37,6 @@ import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; -import sun.security.action.LoadLibraryAction; import sun.util.logging.LoggingSupport; @@ -422,7 +421,13 @@ } static { - AccessController.doPrivileged(new LoadLibraryAction("management")); + AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("management"); + return null; + } + }); jvm = new VMManagementImpl(); } --- old/src/share/classes/sun/net/sdp/SdpSupport.java Wed Apr 25 15:21:48 2012 +++ new/src/share/classes/sun/net/sdp/SdpSupport.java Wed Apr 25 15:21:47 2012 @@ -76,6 +76,11 @@ static { AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("net")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); } } --- old/src/share/classes/sun/net/spi/DefaultProxySelector.java Wed Apr 25 15:21:49 2012 +++ new/src/share/classes/sun/net/spi/DefaultProxySelector.java Wed Apr 25 15:21:49 2012 @@ -95,7 +95,12 @@ }}); if (b != null && b.booleanValue()) { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("net")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); hasSystemProxies = init(); } } --- old/src/share/classes/sun/nio/ch/Util.java Wed Apr 25 15:21:50 2012 +++ new/src/share/classes/sun/nio/ch/Util.java Wed Apr 25 15:21:50 2012 @@ -472,10 +472,15 @@ if (loaded) return; loaded = true; - java.security.AccessController - .doPrivileged(new sun.security.action.LoadLibraryAction("net")); - java.security.AccessController - .doPrivileged(new sun.security.action.LoadLibraryAction("nio")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + System.loadLibrary("nio"); + return null; + } + }); + // IOUtil must be initialized; Its native methods are called from // other places in native nio code so they must be set up. IOUtil.initIDs(); --- old/src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java Wed Apr 25 15:21:51 2012 +++ new/src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java Wed Apr 25 15:21:51 2012 @@ -36,7 +36,13 @@ private static native Hashtable getKerberosConfig(); static { - java.security.AccessController.doPrivileged(new sun.security.action.LoadLibraryAction("osx")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("osx"); + return null; + } + }); installNotificationCallback(); } --- old/src/share/classes/sun/security/smartcardio/PCSC.java Wed Apr 25 15:21:52 2012 +++ new/src/share/classes/sun/security/smartcardio/PCSC.java Wed Apr 25 15:21:52 2012 @@ -27,8 +27,6 @@ import java.security.AccessController; -import sun.security.action.LoadLibraryAction; - /** * Access to native PC/SC functions and definition of PC/SC constants. * Initialization and platform specific PC/SC constants are handled in --- old/src/share/classes/sun/tracing/dtrace/JVM.java Wed Apr 25 15:21:54 2012 +++ new/src/share/classes/sun/tracing/dtrace/JVM.java Wed Apr 25 15:21:53 2012 @@ -35,8 +35,13 @@ class JVM { static { - java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("jsdt")); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("jsdt"); + return null; + } + }); } static long activate(String moduleName, DTraceProvider[] providers) { --- old/src/solaris/classes/sun/management/FileSystemImpl.java Wed Apr 25 15:21:55 2012 +++ new/src/solaris/classes/sun/management/FileSystemImpl.java Wed Apr 25 15:21:54 2012 @@ -49,6 +49,10 @@ static { java.security.AccessController - .doPrivileged(new sun.security.action.LoadLibraryAction("management")); + .doPrivileged(new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("management"); + return null; + }}); } } --- old/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java Wed Apr 25 15:21:56 2012 +++ new/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java Wed Apr 25 15:21:55 2012 @@ -251,7 +251,12 @@ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("net")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); } } --- old/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java Wed Apr 25 15:21:57 2012 +++ new/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java Wed Apr 25 15:21:57 2012 @@ -1100,7 +1100,12 @@ static { Util.load(); /* loads nio & net native libraries */ java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("sctp")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("sctp"); + return null; + } + }); initIDs(); } } --- old/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java Wed Apr 25 15:21:58 2012 +++ new/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java Wed Apr 25 15:21:58 2012 @@ -989,6 +989,11 @@ static { Util.load(); /* loads nio & net native libraries */ java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("sctp")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("sctp"); + return null; + } + }); } } --- old/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java Wed Apr 25 15:21:59 2012 +++ new/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java Wed Apr 25 15:21:59 2012 @@ -428,7 +428,12 @@ static { Util.load(); // loads nio & net native libraries java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("sctp")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("sctp"); + return null; + } + }); initIDs(); } } --- old/src/solaris/classes/sun/print/CUPSPrinter.java Wed Apr 25 15:22:00 2012 +++ new/src/solaris/classes/sun/print/CUPSPrinter.java Wed Apr 25 15:22:00 2012 @@ -77,7 +77,12 @@ static { // load awt library to access native code java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); libFound = initIDs(); if (libFound) { cupsServer = getCupsServer(); --- old/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java Wed Apr 25 15:22:02 2012 +++ new/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java Wed Apr 25 15:22:01 2012 @@ -37,8 +37,6 @@ import java.util.List; import java.util.concurrent.*; -import sun.security.action.LoadLibraryAction; - import static sun.awt.shell.Win32ShellFolder2.*; import sun.awt.OSInfo; @@ -56,7 +54,13 @@ static { // Load library here - AccessController.doPrivileged(new LoadLibraryAction("awt")); + AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); } public ShellFolder createShellFolder(File file) throws FileNotFoundException { --- old/src/windows/classes/sun/awt/windows/WToolkit.java Wed Apr 25 15:22:03 2012 +++ new/src/windows/classes/sun/awt/windows/WToolkit.java Wed Apr 25 15:22:02 2012 @@ -94,7 +94,12 @@ public static void loadLibraries() { if (!loaded) { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); loaded = true; } } --- old/src/windows/classes/sun/management/FileSystemImpl.java Wed Apr 25 15:22:04 2012 +++ new/src/windows/classes/sun/management/FileSystemImpl.java Wed Apr 25 15:22:04 2012 @@ -57,7 +57,13 @@ static { java.security.AccessController - .doPrivileged(new sun.security.action.LoadLibraryAction("management")); + .doPrivileged(new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("management"); + return null; + } + }); + init0(); } } --- old/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java Wed Apr 25 15:22:05 2012 +++ new/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java Wed Apr 25 15:22:05 2012 @@ -161,7 +161,12 @@ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("net")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); init0(); // start the address listener thread --- old/src/windows/classes/sun/print/Win32PrintServiceLookup.java Wed Apr 25 15:22:06 2012 +++ new/src/windows/classes/sun/print/Win32PrintServiceLookup.java Wed Apr 25 15:22:06 2012 @@ -56,7 +56,12 @@ static { java.security.AccessController.doPrivileged( - new sun.security.action.LoadLibraryAction("awt")); + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("awt"); + return null; + } + }); } /* The singleton win32 print lookup service. --- old/src/windows/classes/sun/security/smartcardio/PlatformPCSC.java Wed Apr 25 15:22:07 2012 +++ new/src/windows/classes/sun/security/smartcardio/PlatformPCSC.java Wed Apr 25 15:22:07 2012 @@ -26,9 +26,8 @@ package sun.security.smartcardio; import java.security.AccessController; +import java.security.PrivilegedAction; -import sun.security.action.LoadLibraryAction; - // Platform specific code and constants class PlatformPCSC { @@ -44,7 +43,12 @@ private static Throwable loadLibrary() { try { - AccessController.doPrivileged(new LoadLibraryAction("j2pcsc")); + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + System.loadLibrary("j2pcsc"); + return null; + } + }); return null; } catch (Throwable e) { return e; --- old/src/share/classes/sun/security/action/LoadLibraryAction.java Wed Apr 25 15:22:08 2012 +++ /dev/null Wed Apr 25 15:22:09 2012 @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1998, 2006, 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 - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.security.action; - -/** - * A convenience class for loading a system library as a privileged action. - * - *

An instance of this class can be used as the argument of - * AccessController.doPrivileged. - * - *

The following code attempts to load the system library named - * "lib" as a privileged action:

- * - *

- * java.security.AccessController.doPrivileged(new LoadLibraryAction("lib"));
- * 
- * - * @author Roland Schemers - * @see java.security.PrivilegedAction - * @see java.security.AccessController - * @since 1.2 - */ - -public class LoadLibraryAction implements java.security.PrivilegedAction { - private String theLib; - - /** - * Constructor that takes the name of the system library that needs to be - * loaded. - * - *

The manner in which a library name is mapped to the - * actual system library is system dependent. - * - * @param theLib the name of the library. - */ - public LoadLibraryAction(String theLib) { - this.theLib = theLib; - } - - /** - * Loads the system library whose name was specified in the constructor. - */ - public Void run() { - System.loadLibrary(theLib); - return null; - } -}