Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
89ac12a8
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看板
提交
89ac12a8
编写于
3月 14, 2017
作者:
S
smarks
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8173697: Less Active Activations
Reviewed-by: skoivu, rhalade, rriggs, chegar, coffeys
上级
658780e1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
8 deletion
+28
-8
src/share/classes/java/rmi/activation/ActivationID.java
src/share/classes/java/rmi/activation/ActivationID.java
+28
-8
未找到文件。
src/share/classes/java/rmi/activation/ActivationID.java
浏览文件 @
89ac12a8
/*
/*
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -40,6 +40,12 @@ import java.rmi.server.RemoteObject;
...
@@ -40,6 +40,12 @@ import java.rmi.server.RemoteObject;
import
java.rmi.server.RemoteObjectInvocationHandler
;
import
java.rmi.server.RemoteObjectInvocationHandler
;
import
java.rmi.server.RemoteRef
;
import
java.rmi.server.RemoteRef
;
import
java.rmi.server.UID
;
import
java.rmi.server.UID
;
import
java.security.AccessControlContext
;
import
java.security.AccessController
;
import
java.security.Permissions
;
import
java.security.PrivilegedActionException
;
import
java.security.PrivilegedExceptionAction
;
import
java.security.ProtectionDomain
;
/**
/**
* Activation makes use of special identifiers to denote remote
* Activation makes use of special identifiers to denote remote
...
@@ -81,6 +87,14 @@ public class ActivationID implements Serializable {
...
@@ -81,6 +87,14 @@ public class ActivationID implements Serializable {
/** indicate compatibility with the Java 2 SDK v1.2 version of class */
/** indicate compatibility with the Java 2 SDK v1.2 version of class */
private
static
final
long
serialVersionUID
=
-
4608673054848209235L
;
private
static
final
long
serialVersionUID
=
-
4608673054848209235L
;
/** an AccessControlContext with no permissions */
private
static
final
AccessControlContext
NOPERMS_ACC
;
static
{
Permissions
perms
=
new
Permissions
();
ProtectionDomain
[]
pd
=
{
new
ProtectionDomain
(
null
,
perms
)
};
NOPERMS_ACC
=
new
AccessControlContext
(
pd
);
}
/**
/**
* The constructor for <code>ActivationID</code> takes a single
* The constructor for <code>ActivationID</code> takes a single
* argument, activator, that specifies a remote reference to the
* argument, activator, that specifies a remote reference to the
...
@@ -116,13 +130,19 @@ public class ActivationID implements Serializable {
...
@@ -116,13 +130,19 @@ public class ActivationID implements Serializable {
try
{
try
{
MarshalledObject
<?
extends
Remote
>
mobj
=
MarshalledObject
<?
extends
Remote
>
mobj
=
activator
.
activate
(
this
,
force
);
activator
.
activate
(
this
,
force
);
return
mobj
.
get
();
return
AccessController
.
doPrivileged
(
}
catch
(
RemoteException
e
)
{
new
PrivilegedExceptionAction
<
Remote
>()
{
throw
e
;
public
Remote
run
()
throws
IOException
,
ClassNotFoundException
{
}
catch
(
IOException
e
)
{
return
mobj
.
get
();
throw
new
UnmarshalException
(
"activation failed"
,
e
);
}
}
catch
(
ClassNotFoundException
e
)
{
},
NOPERMS_ACC
);
throw
new
UnmarshalException
(
"activation failed"
,
e
);
}
catch
(
PrivilegedActionException
pae
)
{
Exception
ex
=
pae
.
getException
();
if
(
ex
instanceof
RemoteException
)
{
throw
(
RemoteException
)
ex
;
}
else
{
throw
new
UnmarshalException
(
"activation failed"
,
ex
);
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录