Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
17fc9f84
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
17fc9f84
编写于
6月 29, 2015
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
8e8971fd
d7b9a001
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
65 deletion
+18
-65
src/share/classes/sun/rmi/transport/DGCImpl.java
src/share/classes/sun/rmi/transport/DGCImpl.java
+18
-3
src/windows/native/sun/bridge/AccessBridgeDebug.cpp
src/windows/native/sun/bridge/AccessBridgeDebug.cpp
+0
-33
src/windows/native/sun/bridge/AccessBridgeDebug.h
src/windows/native/sun/bridge/AccessBridgeDebug.h
+0
-1
src/windows/native/sun/bridge/WinAccessBridge.cpp
src/windows/native/sun/bridge/WinAccessBridge.cpp
+0
-28
未找到文件。
src/share/classes/sun/rmi/transport/DGCImpl.java
浏览文件 @
17fc9f84
/*
* Copyright (c) 1996, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 201
5
, 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
...
...
@@ -24,6 +24,7 @@
*/
package
sun.rmi.transport
;
import
java.net.SocketPermission
;
import
java.rmi.Remote
;
import
java.rmi.RemoteException
;
import
java.rmi.dgc.DGC
;
...
...
@@ -33,8 +34,11 @@ import java.rmi.server.LogStream;
import
java.rmi.server.ObjID
;
import
java.rmi.server.RemoteServer
;
import
java.rmi.server.ServerNotActiveException
;
import
java.security.AccessControlContext
;
import
java.security.AccessController
;
import
java.security.Permissions
;
import
java.security.PrivilegedAction
;
import
java.security.ProtectionDomain
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.HashMap
;
...
...
@@ -296,8 +300,19 @@ final class DGCImpl implements DGC {
Util
.
createProxy
(
DGCImpl
.
class
,
new
UnicastRef
(
ref
),
true
);
disp
.
setSkeleton
(
dgc
);
Target
target
=
new
Target
(
dgc
,
disp
,
stub
,
dgcID
,
true
);
Permissions
perms
=
new
Permissions
();
perms
.
add
(
new
SocketPermission
(
"*"
,
"accept,resolve"
));
ProtectionDomain
[]
pd
=
{
new
ProtectionDomain
(
null
,
perms
)
};
AccessControlContext
acceptAcc
=
new
AccessControlContext
(
pd
);
Target
target
=
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Target
>()
{
public
Target
run
()
{
return
new
Target
(
dgc
,
disp
,
stub
,
dgcID
,
true
);
}
},
acceptAcc
);
ObjectTable
.
putTarget
(
target
);
}
catch
(
RemoteException
e
)
{
throw
new
Error
(
...
...
src/windows/native/sun/bridge/AccessBridgeDebug.cpp
浏览文件 @
17fc9f84
...
...
@@ -36,39 +36,6 @@
extern
"C"
{
#endif
/**
* print a GetLastError message
*/
char
*
printError
(
char
*
msg
)
{
LPVOID
lpMsgBuf
=
NULL
;
static
char
retbuf
[
256
];
if
(
msg
!=
NULL
)
{
strncpy
((
char
*
)
retbuf
,
msg
,
sizeof
(
retbuf
));
}
if
(
!
FormatMessage
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
GetLastError
(),
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
// Default language
(
LPTSTR
)
&
lpMsgBuf
,
0
,
NULL
))
{
PrintDebugString
(
" %s: FormatMessage failed"
,
msg
);
}
else
{
PrintDebugString
(
" %s: %s"
,
msg
,
(
char
*
)
lpMsgBuf
);
}
if
(
lpMsgBuf
!=
NULL
)
{
strncat
((
char
*
)
retbuf
,
": "
,
sizeof
(
retbuf
)
-
strlen
(
retbuf
)
-
1
);
strncat
((
char
*
)
retbuf
,
(
char
*
)
lpMsgBuf
,
sizeof
(
retbuf
)
-
strlen
(
retbuf
)
-
1
);
}
return
(
char
*
)
retbuf
;
}
/**
* Send debugging info to the appropriate place
*/
...
...
src/windows/native/sun/bridge/AccessBridgeDebug.h
浏览文件 @
17fc9f84
...
...
@@ -49,7 +49,6 @@
extern
"C"
{
#endif
char
*
printError
(
char
*
msg
);
void
PrintDebugString
(
char
*
msg
,
...);
void
PrintJavaDebugString
(
char
*
msg
,
...);
void
wPrintJavaDebugString
(
wchar_t
*
msg
,
...);
...
...
src/windows/native/sun/bridge/WinAccessBridge.cpp
浏览文件 @
17fc9f84
...
...
@@ -262,34 +262,6 @@ WinAccessBridge::WinAccessBridge(HINSTANCE hInstance) {
theWindowsAccessBridge
=
this
;
isVMInstanceChainInUse
=
false
;
// notify the user if new JVMs are found
/*
newJVMs = (char **)malloc(MAX_NEW_JVMS_FOUND);
for (int i = 0; i < MAX_NEW_JVMS_FOUND; i++) {
newJVMs[i] = (char *)malloc(SHORT_STRING_SIZE);
newJVMs[i][0] = 0;
}
BOOL newJ2SEFound = findNewJVMs(J2SE_REG_PATH, newJVMs);
BOOL newJ2REFound = TRUE; // findNewJVMs(J2RE_REG_PATH, newJVMs);
if (newJ2SEFound || newJ2REFound) {
int result = DialogBox(windowsInstance,
"FOUNDNEWJVMDIALOG",
NULL,
(DLGPROC)newJVMFoundDialogProc);
if (result < 0) {
printError("DialogBox failed");
}
PrintDebugString(" FOUNDNEWJVMDIALOG: result = %d", result);
ShowWindow((HWND)result, SW_SHOW);
}
*/
ShowWindow
(
theDialogWindow
,
SW_SHOW
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录