Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
dd975166
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看板
提交
dd975166
编写于
10月 17, 2013
作者:
M
mullan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8026346: test/java/lang/SecurityManager/CheckPackageAccess.java failing
Reviewed-by: vinnie
上级
84621ebc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
14 deletion
+17
-14
src/share/lib/security/java.security-macosx
src/share/lib/security/java.security-macosx
+4
-4
test/java/lang/SecurityManager/CheckPackageAccess.java
test/java/lang/SecurityManager/CheckPackageAccess.java
+13
-10
未找到文件。
src/share/lib/security/java.security-macosx
浏览文件 @
dd975166
...
@@ -205,12 +205,12 @@ package.access=sun.,\
...
@@ -205,12 +205,12 @@ package.access=sun.,\
com.sun.org.glassfish.,\
com.sun.org.glassfish.,\
com.oracle.xmlns.internal.,\
com.oracle.xmlns.internal.,\
com.oracle.webservices.internal.,\
com.oracle.webservices.internal.,\
oracle.jrockit.jfr.,\
org.jcp.xml.dsig.internal.,\
org.jcp.xml.dsig.internal.,\
jdk.internal.,\
jdk.internal.,\
jdk.nashorn.internal.,\
jdk.nashorn.internal.,\
jdk.nashorn.tools.,\
jdk.nashorn.tools.,\
apple.,\
apple.
oracle.jrockit.jfr.
#
#
# List of comma-separated packages that start with or equal this string
# List of comma-separated packages that start with or equal this string
...
@@ -250,12 +250,12 @@ package.definition=sun.,\
...
@@ -250,12 +250,12 @@ package.definition=sun.,\
com.sun.org.glassfish.,\
com.sun.org.glassfish.,\
com.oracle.xmlns.internal.,\
com.oracle.xmlns.internal.,\
com.oracle.webservices.internal.,\
com.oracle.webservices.internal.,\
oracle.jrockit.jfr.,\
org.jcp.xml.dsig.internal.,\
org.jcp.xml.dsig.internal.,\
jdk.internal.,\
jdk.internal.,\
jdk.nashorn.internal.,\
jdk.nashorn.internal.,\
jdk.nashorn.tools.,\
jdk.nashorn.tools.,\
apple.,\
apple.
oracle.jrockit.jfr.
#
#
# Determines whether this properties file can be appended to
# Determines whether this properties file can be appended to
...
...
test/java/lang/SecurityManager/CheckPackageAccess.java
浏览文件 @
dd975166
...
@@ -29,9 +29,6 @@
...
@@ -29,9 +29,6 @@
* @run main/othervm CheckPackageAccess
* @run main/othervm CheckPackageAccess
*/
*/
import
java.io.File
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.file.Files
;
import
java.security.Security
;
import
java.security.Security
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -50,6 +47,7 @@ public class CheckPackageAccess {
...
@@ -50,6 +47,7 @@ public class CheckPackageAccess {
/*
/*
* This array should be updated whenever new packages are added to the
* This array should be updated whenever new packages are added to the
* package.access property in the java.security file
* package.access property in the java.security file
* NOTE: it should be in the same order as the java.security file
*/
*/
private
static
final
String
[]
packages
=
{
private
static
final
String
[]
packages
=
{
"sun."
,
"sun."
,
...
@@ -99,14 +97,14 @@ public class CheckPackageAccess {
...
@@ -99,14 +97,14 @@ public class CheckPackageAccess {
List
<
String
>
jspkgs
=
List
<
String
>
jspkgs
=
getPackages
(
Security
.
getProperty
(
"package.access"
));
getPackages
(
Security
.
getProperty
(
"package.access"
));
// get closed restricted packages
if
(!
isOpenJDKOnly
())
{
File
f
=
new
File
(
System
.
getProperty
(
"test.src"
),
String
lastPkg
=
pkgs
.
get
(
pkgs
.
size
()
-
1
);
"../../../../src/closed/share/lib/security/restricted.pkgs"
);
if
(
f
.
exists
())
{
List
<
String
>
ipkgs
=
Files
.
readAllLines
(
f
.
toPath
(),
StandardCharsets
.
UTF_8
);
// Remove any closed packages from list before comparing
// Remove any closed packages from list before comparing
jspkgs
.
removeAll
(
ipkgs
);
int
index
=
jspkgs
.
indexOf
(
lastPkg
);
if
(
index
!=
-
1
&&
index
!=
jspkgs
.
size
()
-
1
)
{
jspkgs
.
subList
(
index
+
1
,
jspkgs
.
size
()).
clear
();
}
}
}
// Sort to ensure lists are comparable
// Sort to ensure lists are comparable
...
@@ -164,4 +162,9 @@ public class CheckPackageAccess {
...
@@ -164,4 +162,9 @@ public class CheckPackageAccess {
}
}
return
packages
;
return
packages
;
}
}
private
static
boolean
isOpenJDKOnly
()
{
String
prop
=
System
.
getProperty
(
"java.runtime.name"
);
return
prop
!=
null
&&
prop
.
startsWith
(
"OpenJDK"
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录