Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
49f9de84
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,发现更多精彩内容 >>
提交
49f9de84
编写于
10月 24, 2013
作者:
B
briangoetz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8019646: Clarify javadoc contract of LambdaMetafactory
Reviewed-by: briangoetz, rfield Contributed-by: dan.smith@oracle.com
上级
210ffe56
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
322 addition
and
171 deletion
+322
-171
src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
...java/lang/invoke/AbstractValidatingLambdaMetafactory.java
+2
-3
src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
...classes/java/lang/invoke/InnerClassLambdaMetafactory.java
+19
-10
src/share/classes/java/lang/invoke/LambdaMetafactory.java
src/share/classes/java/lang/invoke/LambdaMetafactory.java
+301
-158
未找到文件。
src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
浏览文件 @
49f9de84
...
...
@@ -101,7 +101,6 @@ import static sun.invoke.util.Wrapper.isWrapperType;
* should implement.
* @param additionalBridges Method types for additional signatures to be
* bridged to the implementation method
* @throws ReflectiveOperationException
* @throws LambdaConversionException If any of the meta-factory protocol
* invariants are violated
*/
...
...
@@ -114,7 +113,7 @@ import static sun.invoke.util.Wrapper.isWrapperType;
boolean
isSerializable
,
Class
<?>[]
markerInterfaces
,
MethodType
[]
additionalBridges
)
throws
ReflectiveOperationException
,
LambdaConversionException
{
throws
LambdaConversionException
{
this
.
targetClass
=
caller
.
lookupClass
();
this
.
invokedType
=
invokedType
;
...
...
@@ -160,7 +159,7 @@ import static sun.invoke.util.Wrapper.isWrapperType;
* @throws ReflectiveOperationException
*/
abstract
CallSite
buildCallSite
()
throws
ReflectiveOperationException
,
LambdaConversionException
;
throws
LambdaConversionException
;
/**
* Check the meta-factory arguments for errors
...
...
src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
浏览文件 @
49f9de84
...
...
@@ -128,7 +128,6 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
* should implement.
* @param additionalBridges Method types for additional signatures to be
* bridged to the implementation method
* @throws ReflectiveOperationException
* @throws LambdaConversionException If any of the meta-factory protocol
* invariants are violated
*/
...
...
@@ -141,7 +140,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
boolean
isSerializable
,
Class
<?>[]
markerInterfaces
,
MethodType
[]
additionalBridges
)
throws
ReflectiveOperationException
,
LambdaConversionException
{
throws
LambdaConversionException
{
super
(
caller
,
invokedType
,
samMethodName
,
samMethodType
,
implMethod
,
instantiatedMethodType
,
isSerializable
,
markerInterfaces
,
additionalBridges
);
...
...
@@ -179,7 +178,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
* is not found
*/
@Override
CallSite
buildCallSite
()
throws
ReflectiveOperationException
,
LambdaConversionException
{
CallSite
buildCallSite
()
throws
LambdaConversionException
{
final
Class
<?>
innerClass
=
spinInnerClass
();
if
(
invokedType
.
parameterCount
()
==
0
)
{
final
Constructor
[]
ctrs
=
AccessController
.
doPrivileged
(
...
...
@@ -190,7 +189,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
}
});
if
(
ctrs
.
length
!=
1
)
{
throw
new
ReflectiveOperat
ionException
(
"Expected one lambda constructor for "
throw
new
LambdaConvers
ionException
(
"Expected one lambda constructor for "
+
innerClass
.
getCanonicalName
()
+
", got "
+
ctrs
.
length
);
}
// The lambda implementing inner class constructor is private, set
...
...
@@ -202,13 +201,23 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
return
null
;
}
});
Object
inst
=
ctrs
[
0
].
newInstance
();
return
new
ConstantCallSite
(
MethodHandles
.
constant
(
samBase
,
inst
));
try
{
Object
inst
=
ctrs
[
0
].
newInstance
();
return
new
ConstantCallSite
(
MethodHandles
.
constant
(
samBase
,
inst
));
}
catch
(
ReflectiveOperationException
e
)
{
throw
new
LambdaConversionException
(
"Exception instantiating lambda object"
,
e
);
}
}
else
{
return
new
ConstantCallSite
(
MethodHandles
.
Lookup
.
IMPL_LOOKUP
.
findConstructor
(
innerClass
,
constructorType
)
.
asType
(
constructorType
.
changeReturnType
(
samBase
)));
try
{
return
new
ConstantCallSite
(
MethodHandles
.
Lookup
.
IMPL_LOOKUP
.
findConstructor
(
innerClass
,
constructorType
)
.
asType
(
constructorType
.
changeReturnType
(
samBase
)));
}
catch
(
ReflectiveOperationException
e
)
{
throw
new
LambdaConversionException
(
"Exception finding constructor"
,
e
);
}
}
}
...
...
src/share/classes/java/lang/invoke/LambdaMetafactory.java
浏览文件 @
49f9de84
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录