Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
25657da5
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
25657da5
编写于
5月 01, 2012
作者:
M
mchung
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
Reviewed-by: alanb, mullan, prr
上级
c7160959
变更
49
隐藏空白更改
内联
并排
Showing
49 changed file
with
323 addition
and
153 deletion
+323
-153
src/macosx/classes/apple/launcher/JavaAppLauncher.java
src/macosx/classes/apple/launcher/JavaAppLauncher.java
+7
-2
src/macosx/classes/apple/security/KeychainStore.java
src/macosx/classes/apple/security/KeychainStore.java
+7
-1
src/macosx/classes/com/apple/concurrent/LibDispatchNative.java
...acosx/classes/com/apple/concurrent/LibDispatchNative.java
+17
-11
src/macosx/classes/com/apple/eawt/Application.java
src/macosx/classes/com/apple/eawt/Application.java
+7
-2
src/macosx/classes/com/apple/eio/FileManager.java
src/macosx/classes/com/apple/eio/FileManager.java
+7
-1
src/macosx/classes/com/apple/laf/AquaFileView.java
src/macosx/classes/com/apple/laf/AquaFileView.java
+7
-2
src/macosx/classes/com/apple/laf/AquaLookAndFeel.java
src/macosx/classes/com/apple/laf/AquaLookAndFeel.java
+9
-3
src/macosx/classes/com/apple/laf/AquaNativeResources.java
src/macosx/classes/com/apple/laf/AquaNativeResources.java
+7
-2
src/macosx/classes/com/apple/laf/ScreenMenu.java
src/macosx/classes/com/apple/laf/ScreenMenu.java
+7
-2
src/macosx/classes/com/apple/laf/ScreenPopupFactory.java
src/macosx/classes/com/apple/laf/ScreenPopupFactory.java
+7
-3
src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java
...macosx/classes/java/util/prefs/MacOSXPreferencesFile.java
+7
-1
src/macosx/classes/sun/awt/CGraphicsEnvironment.java
src/macosx/classes/sun/awt/CGraphicsEnvironment.java
+9
-3
src/macosx/classes/sun/lwawt/macosx/CAccessibility.java
src/macosx/classes/sun/lwawt/macosx/CAccessibility.java
+7
-2
src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
...classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
+6
-1
src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
...classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
+6
-1
src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java
...hare/classes/com/sun/java/util/jar/pack/NativeUnpack.java
+6
-1
src/share/classes/java/awt/SplashScreen.java
src/share/classes/java/awt/SplashScreen.java
+6
-1
src/share/classes/java/awt/Toolkit.java
src/share/classes/java/awt/Toolkit.java
+6
-1
src/share/classes/java/awt/event/NativeLibLoader.java
src/share/classes/java/awt/event/NativeLibLoader.java
+6
-1
src/share/classes/java/awt/image/ColorModel.java
src/share/classes/java/awt/image/ColorModel.java
+6
-1
src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
...are/classes/java/net/AbstractPlainDatagramSocketImpl.java
+6
-1
src/share/classes/java/net/AbstractPlainSocketImpl.java
src/share/classes/java/net/AbstractPlainSocketImpl.java
+6
-1
src/share/classes/java/net/DatagramPacket.java
src/share/classes/java/net/DatagramPacket.java
+6
-1
src/share/classes/java/net/InetAddress.java
src/share/classes/java/net/InetAddress.java
+7
-1
src/share/classes/java/net/NetworkInterface.java
src/share/classes/java/net/NetworkInterface.java
+8
-1
src/share/classes/sun/awt/NativeLibLoader.java
src/share/classes/sun/awt/NativeLibLoader.java
+6
-1
src/share/classes/sun/awt/image/JPEGImageDecoder.java
src/share/classes/sun/awt/image/JPEGImageDecoder.java
+6
-1
src/share/classes/sun/awt/image/NativeLibLoader.java
src/share/classes/sun/awt/image/NativeLibLoader.java
+7
-2
src/share/classes/sun/java2d/Disposer.java
src/share/classes/sun/java2d/Disposer.java
+6
-1
src/share/classes/sun/management/ManagementFactoryHelper.java
...share/classes/sun/management/ManagementFactoryHelper.java
+7
-2
src/share/classes/sun/net/sdp/SdpSupport.java
src/share/classes/sun/net/sdp/SdpSupport.java
+6
-1
src/share/classes/sun/net/spi/DefaultProxySelector.java
src/share/classes/sun/net/spi/DefaultProxySelector.java
+6
-1
src/share/classes/sun/nio/ch/Util.java
src/share/classes/sun/nio/ch/Util.java
+9
-4
src/share/classes/sun/security/action/LoadLibraryAction.java
src/share/classes/sun/security/action/LoadLibraryAction.java
+0
-70
src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java
...share/classes/sun/security/krb5/SCDynamicStoreConfig.java
+7
-1
src/share/classes/sun/security/smartcardio/PCSC.java
src/share/classes/sun/security/smartcardio/PCSC.java
+0
-2
src/share/classes/sun/tracing/dtrace/JVM.java
src/share/classes/sun/tracing/dtrace/JVM.java
+7
-2
src/solaris/classes/sun/management/FileSystemImpl.java
src/solaris/classes/sun/management/FileSystemImpl.java
+7
-2
src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
...olaris/classes/sun/net/dns/ResolverConfigurationImpl.java
+6
-1
src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java
src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java
+6
-1
src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java
...solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java
+6
-1
src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
...olaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
+6
-1
src/solaris/classes/sun/print/CUPSPrinter.java
src/solaris/classes/sun/print/CUPSPrinter.java
+6
-1
src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
...ndows/classes/sun/awt/shell/Win32ShellFolderManager2.java
+7
-3
src/windows/classes/sun/awt/windows/WToolkit.java
src/windows/classes/sun/awt/windows/WToolkit.java
+6
-1
src/windows/classes/sun/management/FileSystemImpl.java
src/windows/classes/sun/management/FileSystemImpl.java
+7
-2
src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
...indows/classes/sun/net/dns/ResolverConfigurationImpl.java
+6
-1
src/windows/classes/sun/print/Win32PrintServiceLookup.java
src/windows/classes/sun/print/Win32PrintServiceLookup.java
+6
-1
src/windows/classes/sun/security/smartcardio/PlatformPCSC.java
...indows/classes/sun/security/smartcardio/PlatformPCSC.java
+7
-3
未找到文件。
src/macosx/classes/apple/launcher/JavaAppLauncher.java
浏览文件 @
25657da5
...
...
@@ -27,7 +27,6 @@ package apple.launcher;
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 @@ import javax.swing.*;
class
JavaAppLauncher
implements
Runnable
{
static
{
java
.
security
.
AccessController
.
doPrivileged
((
PrivilegedAction
<?>)
new
sun
.
security
.
action
.
LoadLibraryAction
(
"osx"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osx"
);
return
null
;
}
});
}
private
static
native
<
T
>
T
nativeConvertAndRelease
(
final
long
ptr
);
...
...
src/macosx/classes/apple/security/KeychainStore.java
浏览文件 @
25657da5
...
...
@@ -103,7 +103,13 @@ public final class KeychainStore extends KeyStoreSpi {
private
static
final
int
SALT_LEN
=
20
;
static
{
java
.
security
.
AccessController
.
doPrivileged
((
PrivilegedAction
<?>)
new
sun
.
security
.
action
.
LoadLibraryAction
(
"osx"
));
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osx"
);
return
null
;
}
});
try
{
PKCS8ShroudedKeyBag_OID
=
new
ObjectIdentifier
(
keyBag
);
pbeWithSHAAnd3KeyTripleDESCBC_OID
=
new
ObjectIdentifier
(
pbeWithSHAAnd3KeyTripleDESCBC
);
...
...
src/macosx/classes/com/apple/concurrent/LibDispatchNative.java
浏览文件 @
25657da5
...
...
@@ -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
<
Void
>()
{
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
()
{
}
}
src/macosx/classes/com/apple/eawt/Application.java
浏览文件 @
25657da5
...
...
@@ -28,7 +28,6 @@ package com.apple.eawt;
import
java.awt.*
;
import
java.awt.peer.*
;
import
java.beans.Beans
;
import
java.security.PrivilegedAction
;
import
javax.swing.JMenuBar
;
...
...
@@ -59,7 +58,13 @@ public class Application {
static
Application
sApplication
=
null
;
static
{
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
;
}
});
checkSecurity
();
if
(!
Beans
.
isDesignTime
())
{
...
...
src/macosx/classes/com/apple/eio/FileManager.java
浏览文件 @
25657da5
...
...
@@ -55,7 +55,13 @@ import java.io.*;
*/
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
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osx"
);
return
null
;
}
});
}
/**
...
...
src/macosx/classes/com/apple/laf/AquaFileView.java
浏览文件 @
25657da5
...
...
@@ -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 @@ class AquaFileView extends FileView {
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
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osxui"
);
return
null
;
}
});
}
// TODO: Un-comment this out when the native version exists
...
...
src/macosx/classes/com/apple/laf/AquaLookAndFeel.java
浏览文件 @
25657da5
...
...
@@ -134,10 +134,16 @@ public class AquaLookAndFeel extends BasicLookAndFeel {
* @see UIManager#setLookAndFeel
*/
public
void
initialize
()
{
java
.
security
.
AccessController
.
doPrivileged
((
PrivilegedAction
<?>)
new
sun
.
security
.
action
.
LoadLibraryAction
(
"osxui"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Object
>(){
java
.
security
.
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osxui"
);
return
null
;
}
});
java
.
security
.
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Void
>(){
@Override
public
Object
run
()
{
public
Void
run
()
{
JRSUIControl
.
initJRSUI
();
return
null
;
}
...
...
src/macosx/classes/com/apple/laf/AquaNativeResources.java
浏览文件 @
25657da5
...
...
@@ -27,7 +27,6 @@ package com.apple.laf;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.security.PrivilegedAction
;
import
javax.swing.plaf.UIResource
;
...
...
@@ -35,7 +34,13 @@ import com.apple.laf.AquaUtils.RecyclableSingleton;
public
class
AquaNativeResources
{
static
{
java
.
security
.
AccessController
.
doPrivileged
((
PrivilegedAction
<?>)
new
sun
.
security
.
action
.
LoadLibraryAction
(
"osxui"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osxui"
);
return
null
;
}
});
}
// TODO: removing CColorPaint for now
...
...
src/macosx/classes/com/apple/laf/ScreenMenu.java
浏览文件 @
25657da5
...
...
@@ -28,7 +28,6 @@ package com.apple.laf;
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 @@ import sun.lwawt.macosx.*;
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
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
}
// screen menu stuff
...
...
src/macosx/classes/com/apple/laf/ScreenPopupFactory.java
浏览文件 @
25657da5
...
...
@@ -26,15 +26,19 @@
package
com.apple.laf
;
import
java.awt.*
;
import
java.security.PrivilegedAction
;
import
javax.swing.*
;
import
sun.lwawt.macosx.CPlatformWindow
;
class
ScreenPopupFactory
extends
PopupFactory
{
static
{
java
.
security
.
AccessController
.
doPrivileged
((
PrivilegedAction
<?>)
new
sun
.
security
.
action
.
LoadLibraryAction
(
"osxui"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osxui"
);
return
null
;
}
});
}
static
final
Float
TRANSLUCENT
=
new
Float
(
248
f
/
255
f
);
...
...
src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java
浏览文件 @
25657da5
...
...
@@ -79,7 +79,13 @@ import java.lang.ref.WeakReference;
class
MacOSXPreferencesFile
{
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"osx"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osx"
);
return
null
;
}
});
}
private
class
FlushTask
extends
TimerTask
{
...
...
src/macosx/classes/sun/awt/CGraphicsEnvironment.java
浏览文件 @
25657da5
...
...
@@ -58,9 +58,15 @@ public class CGraphicsEnvironment extends SunGraphicsEnvironment {
public
static
void
init
()
{
}
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Object
>()
{
public
Object
run
()
{
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
if
(
isHeadless
())
return
null
;
initCocoa
();
return
null
;
...
...
src/macosx/classes/sun/lwawt/macosx/CAccessibility.java
浏览文件 @
25657da5
...
...
@@ -29,7 +29,6 @@ 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
;
...
...
@@ -41,7 +40,13 @@ class CAccessibility implements PropertyChangeListener {
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
;
...
...
src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
浏览文件 @
25657da5
...
...
@@ -87,7 +87,12 @@ public class JPEGImageReader extends ImageReader {
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"jpeg"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"jpeg"
);
return
null
;
}
});
initReaderIDs
(
ImageInputStream
.
class
,
JPEGQTable
.
class
,
JPEGHuffmanTable
.
class
);
...
...
src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
浏览文件 @
25657da5
...
...
@@ -177,7 +177,12 @@ public class JPEGImageWriter extends ImageWriter {
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"jpeg"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"jpeg"
);
return
null
;
}
});
initWriterIDs
(
ImageOutputStream
.
class
,
JPEGQTable
.
class
,
JPEGHuffmanTable
.
class
);
...
...
src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java
浏览文件 @
25657da5
...
...
@@ -87,7 +87,12 @@ class NativeUnpack {
// 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
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"unpack"
);
return
null
;
}
});
initIDs
();
}
...
...
src/share/classes/java/awt/SplashScreen.java
浏览文件 @
25657da5
...
...
@@ -119,7 +119,12 @@ public final class SplashScreen {
// SplashScreen class is now a singleton
if
(!
wasClosed
&&
theInstance
==
null
)
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"splashscreen"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"splashscreen"
);
return
null
;
}
});
long
ptr
=
_getInstance
();
if
(
ptr
!=
0
&&
_isVisible
(
ptr
))
{
theInstance
=
new
SplashScreen
(
ptr
);
...
...
src/share/classes/java/awt/Toolkit.java
浏览文件 @
25657da5
...
...
@@ -1646,7 +1646,12 @@ public abstract class Toolkit {
static
void
loadLibraries
()
{
if
(!
loaded
)
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
loaded
=
true
;
}
}
...
...
src/share/classes/java/awt/event/NativeLibLoader.java
浏览文件 @
25657da5
...
...
@@ -54,6 +54,11 @@ class NativeLibLoader {
*/
static
void
loadLibraries
()
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
}
}
src/share/classes/java/awt/image/ColorModel.java
浏览文件 @
25657da5
...
...
@@ -204,7 +204,12 @@ public abstract class ColorModel implements Transparency{
static
void
loadLibraries
()
{
if
(!
loaded
)
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
loaded
=
true
;
}
}
...
...
src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
浏览文件 @
25657da5
...
...
@@ -67,7 +67,12 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
*/
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"net"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
}
/**
...
...
src/share/classes/java/net/AbstractPlainSocketImpl.java
浏览文件 @
25657da5
...
...
@@ -78,7 +78,12 @@ abstract class AbstractPlainSocketImpl extends SocketImpl
*/
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"net"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
}
/**
...
...
src/share/classes/java/net/DatagramPacket.java
浏览文件 @
25657da5
...
...
@@ -47,7 +47,12 @@ class DatagramPacket {
*/
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"net"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
init
();
}
...
...
src/share/classes/java/net/InetAddress.java
浏览文件 @
25657da5
...
...
@@ -234,7 +234,13 @@ class InetAddress implements java.io.Serializable {
static
{
preferIPv6Address
=
java
.
security
.
AccessController
.
doPrivileged
(
new
GetBooleanAction
(
"java.net.preferIPv6Addresses"
)).
booleanValue
();
AccessController
.
doPrivileged
(
new
LoadLibraryAction
(
"net"
));
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
init
();
}
...
...
src/share/classes/java/net/NetworkInterface.java
浏览文件 @
25657da5
...
...
@@ -53,7 +53,14 @@ public final class NetworkInterface {
private
static
final
int
defaultIndex
;
/* index of defaultInterface */
static
{
AccessController
.
doPrivileged
(
new
LoadLibraryAction
(
"net"
));
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
init
();
defaultInterface
=
DefaultInterface
.
getDefault
();
if
(
defaultInterface
!=
null
)
{
...
...
src/share/classes/sun/awt/NativeLibLoader.java
浏览文件 @
25657da5
...
...
@@ -54,6 +54,11 @@ class NativeLibLoader {
*/
static
void
loadLibraries
()
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
}
}
src/share/classes/sun/awt/image/JPEGImageDecoder.java
浏览文件 @
25657da5
...
...
@@ -54,7 +54,12 @@ public class JPEGImageDecoder extends ImageDecoder {
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"jpeg"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"jpeg"
);
return
null
;
}
});
initIDs
(
InputStreamClass
);
RGBcolormodel
=
new
DirectColorModel
(
24
,
0xff0000
,
0xff00
,
0xff
);
ARGBcolormodel
=
ColorModel
.
getRGBdefault
();
...
...
src/share/classes/sun/awt/image/NativeLibLoader.java
浏览文件 @
25657da5
...
...
@@ -53,7 +53,12 @@ class NativeLibLoader {
* 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
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
}
}
src/share/classes/sun/java2d/Disposer.java
浏览文件 @
25657da5
...
...
@@ -57,7 +57,12 @@ public class Disposer implements Runnable {
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
initIDs
();
String
type
=
(
String
)
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
GetPropertyAction
(
"sun.java2d.reftype"
));
...
...
src/share/classes/sun/management/ManagementFactoryHelper.java
浏览文件 @
25657da5
...
...
@@ -37,7 +37,6 @@ import javax.management.RuntimeOperationsException;
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 @@ public class ManagementFactoryHelper {
}
static
{
AccessController
.
doPrivileged
(
new
LoadLibraryAction
(
"management"
));
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"management"
);
return
null
;
}
});
jvm
=
new
VMManagementImpl
();
}
...
...
src/share/classes/sun/net/sdp/SdpSupport.java
浏览文件 @
25657da5
...
...
@@ -76,6 +76,11 @@ public final class SdpSupport {
static
{
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"net"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
}
}
src/share/classes/sun/net/spi/DefaultProxySelector.java
浏览文件 @
25657da5
...
...
@@ -95,7 +95,12 @@ public class DefaultProxySelector extends ProxySelector {
}});
if
(
b
!=
null
&&
b
.
booleanValue
())
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"net"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
hasSystemProxies
=
init
();
}
}
...
...
src/share/classes/sun/nio/ch/Util.java
浏览文件 @
25657da5
...
...
@@ -472,10 +472,15 @@ public class Util {
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
<
Void
>()
{
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
();
...
...
src/share/classes/sun/security/action/LoadLibraryAction.java
已删除
100644 → 0
浏览文件 @
c7160959
/*
* 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.
*
* <p>An instance of this class can be used as the argument of
* <code>AccessController.doPrivileged</code>.
*
* <p>The following code attempts to load the system library named
* <code>"lib"</code> as a privileged action: <p>
*
* <pre>
* java.security.AccessController.doPrivileged(new LoadLibraryAction("lib"));
* </pre>
*
* @author Roland Schemers
* @see java.security.PrivilegedAction
* @see java.security.AccessController
* @since 1.2
*/
public
class
LoadLibraryAction
implements
java
.
security
.
PrivilegedAction
<
Void
>
{
private
String
theLib
;
/**
* Constructor that takes the name of the system library that needs to be
* loaded.
*
* <p>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
;
}
}
src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java
浏览文件 @
25657da5
...
...
@@ -36,7 +36,13 @@ public class SCDynamicStoreConfig {
private
static
native
Hashtable
<
String
,
Object
>
getKerberosConfig
();
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"osx"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"osx"
);
return
null
;
}
});
installNotificationCallback
();
}
...
...
src/share/classes/sun/security/smartcardio/PCSC.java
浏览文件 @
25657da5
...
...
@@ -27,8 +27,6 @@ package sun.security.smartcardio;
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
...
...
src/share/classes/sun/tracing/dtrace/JVM.java
浏览文件 @
25657da5
...
...
@@ -35,8 +35,13 @@ import java.lang.reflect.Method;
class
JVM
{
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"jsdt"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"jsdt"
);
return
null
;
}
});
}
static
long
activate
(
String
moduleName
,
DTraceProvider
[]
providers
)
{
...
...
src/solaris/classes/sun/management/FileSystemImpl.java
浏览文件 @
25657da5
...
...
@@ -48,7 +48,12 @@ public class FileSystemImpl extends FileSystem {
// Initialization
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"management"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"management"
);
return
null
;
}
});
}
}
src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
浏览文件 @
25657da5
...
...
@@ -251,7 +251,12 @@ public class ResolverConfigurationImpl
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"net"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
}
}
...
...
src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java
浏览文件 @
25657da5
...
...
@@ -1100,7 +1100,12 @@ public class SctpChannelImpl extends SctpChannel
static
{
Util
.
load
();
/* loads nio & net native libraries */
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"sctp"
);
return
null
;
}
});
initIDs
();
}
}
src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java
浏览文件 @
25657da5
...
...
@@ -989,6 +989,11 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
static
{
Util
.
load
();
/* loads nio & net native libraries */
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"sctp"
);
return
null
;
}
});
}
}
src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
浏览文件 @
25657da5
...
...
@@ -428,7 +428,12 @@ public class SctpServerChannelImpl extends SctpServerChannel
static
{
Util
.
load
();
// loads nio & net native libraries
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"sctp"
);
return
null
;
}
});
initIDs
();
}
}
src/solaris/classes/sun/print/CUPSPrinter.java
浏览文件 @
25657da5
...
...
@@ -77,7 +77,12 @@ public class CUPSPrinter {
static
{
// load awt library to access native code
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
libFound
=
initIDs
();
if
(
libFound
)
{
cupsServer
=
getCupsServer
();
...
...
src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
浏览文件 @
25657da5
...
...
@@ -37,8 +37,6 @@ import java.util.*;
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 @@ public class Win32ShellFolderManager2 extends ShellFolderManager {
static
{
// Load library here
AccessController
.
doPrivileged
(
new
LoadLibraryAction
(
"awt"
));
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
}
public
ShellFolder
createShellFolder
(
File
file
)
throws
FileNotFoundException
{
...
...
src/windows/classes/sun/awt/windows/WToolkit.java
浏览文件 @
25657da5
...
...
@@ -94,7 +94,12 @@ public class WToolkit extends SunToolkit implements Runnable {
public
static
void
loadLibraries
()
{
if
(!
loaded
)
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
loaded
=
true
;
}
}
...
...
src/windows/classes/sun/management/FileSystemImpl.java
浏览文件 @
25657da5
...
...
@@ -56,8 +56,13 @@ public class FileSystemImpl extends FileSystem {
// Initialization
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"management"
));
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"management"
);
return
null
;
}
});
init0
();
}
}
src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
浏览文件 @
25657da5
...
...
@@ -161,7 +161,12 @@ public class ResolverConfigurationImpl
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"net"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"net"
);
return
null
;
}
});
init0
();
// start the address listener thread
...
...
src/windows/classes/sun/print/Win32PrintServiceLookup.java
浏览文件 @
25657da5
...
...
@@ -56,7 +56,12 @@ public class Win32PrintServiceLookup extends PrintServiceLookup {
static
{
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"awt"
));
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"awt"
);
return
null
;
}
});
}
/* The singleton win32 print lookup service.
...
...
src/windows/classes/sun/security/smartcardio/PlatformPCSC.java
浏览文件 @
25657da5
...
...
@@ -26,8 +26,7 @@
package
sun.security.smartcardio
;
import
java.security.AccessController
;
import
sun.security.action.LoadLibraryAction
;
import
java.security.PrivilegedAction
;
// Platform specific code and constants
class
PlatformPCSC
{
...
...
@@ -44,7 +43,12 @@ class PlatformPCSC {
private
static
Throwable
loadLibrary
()
{
try
{
AccessController
.
doPrivileged
(
new
LoadLibraryAction
(
"j2pcsc"
));
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
System
.
loadLibrary
(
"j2pcsc"
);
return
null
;
}
});
return
null
;
}
catch
(
Throwable
e
)
{
return
e
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录