Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_corba
提交
03a353a5
D
dragonwell8_corba
项目概览
openanolis
/
dragonwell8_corba
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_corba
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
03a353a5
编写于
4月 20, 2015
作者:
M
msheppar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8076376: Enhance IIOP operations
Reviewed-by: rriggs, coffeys, ahgross, skoivu
上级
2c13970a
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
126 addition
and
41 deletion
+126
-41
src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
...are/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
+126
-41
未找到文件。
src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
浏览文件 @
03a353a5
...
@@ -2417,8 +2417,8 @@ public class IIOPInputStream
...
@@ -2417,8 +2417,8 @@ public class IIOPInputStream
private
void
throwAwayData
(
ValueMember
[]
fields
,
private
void
throwAwayData
(
ValueMember
[]
fields
,
com
.
sun
.
org
.
omg
.
SendingContext
.
CodeBase
sender
)
com
.
sun
.
org
.
omg
.
SendingContext
.
CodeBase
sender
)
throws
InvalidClassException
,
StreamCorruptedException
,
throws
InvalidClassException
,
StreamCorruptedException
,
ClassNotFoundException
,
IOException
ClassNotFoundException
,
IOException
{
{
for
(
int
i
=
0
;
i
<
fields
.
length
;
++
i
)
{
for
(
int
i
=
0
;
i
<
fields
.
length
;
++
i
)
{
try
{
try
{
...
@@ -2553,8 +2553,7 @@ public class IIOPInputStream
...
@@ -2553,8 +2553,7 @@ public class IIOPInputStream
}
}
private
static
void
setObjectField
(
Object
o
,
Class
c
,
String
fieldName
,
Object
v
)
private
static
void
setObjectField
(
Object
o
,
Class
c
,
String
fieldName
,
Object
v
)
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Class
fieldCl
=
fld
.
getType
();
Class
fieldCl
=
fld
.
getType
();
...
@@ -2564,9 +2563,15 @@ public class IIOPInputStream
...
@@ -2564,9 +2563,15 @@ public class IIOPInputStream
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putObject
(
o
,
key
,
v
)
;
bridge
.
putObject
(
o
,
key
,
v
)
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetObjectField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetObjectField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
v
.
toString
()
)
;
v
.
toString
()
)
;
}
else
{
throw
utilWrapper
.
errorSetObjectField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
v
.
toString
()
)
;
}
}
}
}
}
...
@@ -2574,12 +2579,22 @@ public class IIOPInputStream
...
@@ -2574,12 +2579,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Boolean
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putBoolean
(
o
,
key
,
v
)
;
bridge
.
putBoolean
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetBooleanField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetBooleanField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Boolean
(
v
)
)
;
new
Boolean
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetBooleanField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Boolean
(
v
)
)
;
}
}
}
}
}
...
@@ -2587,12 +2602,22 @@ public class IIOPInputStream
...
@@ -2587,12 +2602,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Byte
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putByte
(
o
,
key
,
v
)
;
bridge
.
putByte
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetByteField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetByteField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Byte
(
v
)
)
;
new
Byte
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetByteField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Byte
(
v
)
)
;
}
}
}
}
}
...
@@ -2600,12 +2625,22 @@ public class IIOPInputStream
...
@@ -2600,12 +2625,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Character
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putChar
(
o
,
key
,
v
)
;
bridge
.
putChar
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetCharField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetCharField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Character
(
v
)
)
;
new
Character
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetCharField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Character
(
v
)
)
;
}
}
}
}
}
...
@@ -2613,12 +2648,22 @@ public class IIOPInputStream
...
@@ -2613,12 +2648,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Short
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putShort
(
o
,
key
,
v
)
;
bridge
.
putShort
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetShortField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetShortField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Short
(
v
)
)
;
new
Short
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetShortField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Short
(
v
)
)
;
}
}
}
}
}
...
@@ -2626,12 +2671,22 @@ public class IIOPInputStream
...
@@ -2626,12 +2671,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Integer
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putInt
(
o
,
key
,
v
)
;
bridge
.
putInt
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetIntField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetIntField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Integer
(
v
)
)
;
new
Integer
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetIntField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Integer
(
v
)
)
;
}
}
}
}
}
...
@@ -2639,12 +2694,22 @@ public class IIOPInputStream
...
@@ -2639,12 +2694,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Long
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putLong
(
o
,
key
,
v
)
;
bridge
.
putLong
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetLongField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetLongField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Long
(
v
)
)
;
new
Long
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetLongField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Long
(
v
)
)
;
}
}
}
}
}
...
@@ -2652,12 +2717,22 @@ public class IIOPInputStream
...
@@ -2652,12 +2717,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Float
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putFloat
(
o
,
key
,
v
)
;
bridge
.
putFloat
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetFloatField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetFloatField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Float
(
v
)
)
;
new
Float
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetFloatField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Float
(
v
)
)
;
}
}
}
}
}
...
@@ -2665,12 +2740,22 @@ public class IIOPInputStream
...
@@ -2665,12 +2740,22 @@ public class IIOPInputStream
{
{
try
{
try
{
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
Field
fld
=
c
.
getDeclaredField
(
fieldName
)
;
if
((
fld
!=
null
)
&&
(
fld
.
getType
()
==
Double
.
TYPE
))
{
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
long
key
=
bridge
.
objectFieldOffset
(
fld
)
;
bridge
.
putDouble
(
o
,
key
,
v
)
;
bridge
.
putDouble
(
o
,
key
,
v
)
;
}
else
{
throw
new
InvalidObjectException
(
"Field Type mismatch"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
o
!=
null
)
{
throw
utilWrapper
.
errorSetDoubleField
(
e
,
fieldName
,
throw
utilWrapper
.
errorSetDoubleField
(
e
,
fieldName
,
o
.
toString
(),
o
.
toString
(),
new
Double
(
v
)
)
;
new
Double
(
v
)
)
;
}
else
{
throw
utilWrapper
.
errorSetDoubleField
(
e
,
fieldName
,
"null "
+
c
.
getName
()
+
" object"
,
new
Double
(
v
)
)
;
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录