Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
49593f53
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
49593f53
编写于
8月 01, 2019
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revise DependencyDescriptor etc to avoid MethodParameter deprecations
See gh-23385
上级
b67dbe66
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
4 addition
and
9 deletion
+4
-9
spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java
...ngframework/beans/GenericTypeAwarePropertyDescriptor.java
+1
-2
spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java
...gframework/beans/factory/config/DependencyDescriptor.java
+3
-5
spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
...gframework/beans/factory/support/ConstructorResolver.java
+0
-2
未找到文件。
spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java
浏览文件 @
49593f53
...
...
@@ -102,8 +102,7 @@ final class GenericTypeAwarePropertyDescriptor extends PropertyDescriptor {
this
.
ambiguousWriteMethods
=
ambiguousCandidates
;
}
}
this
.
writeMethodParameter
=
new
MethodParameter
(
this
.
writeMethod
,
0
);
GenericTypeResolver
.
resolveParameterType
(
this
.
writeMethodParameter
,
this
.
beanClass
);
this
.
writeMethodParameter
=
new
MethodParameter
(
this
.
writeMethod
,
0
).
withContainingClass
(
this
.
beanClass
);
}
if
(
this
.
readMethod
!=
null
)
{
...
...
spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java
浏览文件 @
49593f53
...
...
@@ -33,7 +33,6 @@ import org.springframework.beans.BeansException;
import
org.springframework.beans.factory.BeanFactory
;
import
org.springframework.beans.factory.InjectionPoint
;
import
org.springframework.beans.factory.NoUniqueBeanDefinitionException
;
import
org.springframework.core.GenericTypeResolver
;
import
org.springframework.core.KotlinDetector
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.core.ParameterNameDiscoverer
;
...
...
@@ -280,13 +279,12 @@ public class DependencyDescriptor extends InjectionPoint implements Serializable
/**
* Increase this descriptor's nesting level.
* @see MethodParameter#increaseNestingLevel()
*/
public
void
increaseNestingLevel
()
{
this
.
nestingLevel
++;
this
.
resolvableType
=
null
;
if
(
this
.
methodParameter
!=
null
)
{
this
.
methodParameter
.
increaseNestingLevel
();
this
.
methodParameter
=
this
.
methodParameter
.
nested
();
}
}
...
...
@@ -300,7 +298,7 @@ public class DependencyDescriptor extends InjectionPoint implements Serializable
this
.
containingClass
=
containingClass
;
this
.
resolvableType
=
null
;
if
(
this
.
methodParameter
!=
null
)
{
GenericTypeResolver
.
resolveParameterType
(
this
.
methodParameter
,
containingClass
);
this
.
methodParameter
=
this
.
methodParameter
.
withContainingClass
(
containingClass
);
}
}
...
...
@@ -457,7 +455,7 @@ public class DependencyDescriptor extends InjectionPoint implements Serializable
this
.
declaringClass
.
getDeclaredConstructor
(
this
.
parameterTypes
),
this
.
parameterIndex
);
}
for
(
int
i
=
1
;
i
<
this
.
nestingLevel
;
i
++)
{
this
.
methodParameter
.
increaseNestingLevel
();
this
.
methodParameter
=
this
.
methodParameter
.
nested
();
}
}
}
...
...
spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
浏览文件 @
49593f53
...
...
@@ -53,7 +53,6 @@ import org.springframework.beans.factory.config.ConstructorArgumentValues;
import
org.springframework.beans.factory.config.ConstructorArgumentValues.ValueHolder
;
import
org.springframework.beans.factory.config.DependencyDescriptor
;
import
org.springframework.core.CollectionFactory
;
import
org.springframework.core.GenericTypeResolver
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.core.NamedThreadLocal
;
import
org.springframework.core.ParameterNameDiscoverer
;
...
...
@@ -810,7 +809,6 @@ class ConstructorResolver {
for
(
int
argIndex
=
0
;
argIndex
<
argsToResolve
.
length
;
argIndex
++)
{
Object
argValue
=
argsToResolve
[
argIndex
];
MethodParameter
methodParam
=
MethodParameter
.
forExecutable
(
executable
,
argIndex
);
GenericTypeResolver
.
resolveParameterType
(
methodParam
,
executable
.
getDeclaringClass
());
if
(
argValue
instanceof
AutowiredArgumentMarker
)
{
argValue
=
resolveAutowiredArgument
(
methodParam
,
beanName
,
null
,
converter
,
fallback
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录