Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
78d56dc6
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,体验更适合开发者的 AI 搜索 >>
提交
78d56dc6
编写于
7月 31, 2019
作者:
S
stsypanov
提交者:
Sam Brannen
8月 27, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use Arrays.copyOf and Arrays.copyOfRange where possible
Closes gh-23393
上级
216ffcfe
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
6 addition
and
12 deletion
+6
-12
spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java
...java/org/springframework/aop/framework/AopProxyUtils.java
+1
-2
spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java
...a/org/springframework/aop/framework/ProxyFactoryBean.java
+1
-3
spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
...tory/annotation/AutowiredAnnotationBeanPostProcessor.java
+2
-2
spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java
...org/springframework/core/annotation/AttributeMethods.java
+1
-2
spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java
...g/springframework/expression/spel/standard/Tokenizer.java
+1
-3
未找到文件。
spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java
浏览文件 @
78d56dc6
...
...
@@ -180,8 +180,7 @@ public abstract class AopProxyUtils {
if
(
proxy
instanceof
DecoratingProxy
)
{
nonUserIfcCount
++;
}
Class
<?>[]
userInterfaces
=
new
Class
<?>[
proxyInterfaces
.
length
-
nonUserIfcCount
];
System
.
arraycopy
(
proxyInterfaces
,
0
,
userInterfaces
,
0
,
userInterfaces
.
length
);
Class
<?>[]
userInterfaces
=
Arrays
.
copyOf
(
proxyInterfaces
,
proxyInterfaces
.
length
-
nonUserIfcCount
);
Assert
.
notEmpty
(
userInterfaces
,
"JDK proxy must implement one or more interfaces"
);
return
userInterfaces
;
}
...
...
spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java
浏览文件 @
78d56dc6
...
...
@@ -395,9 +395,7 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
logger
.
debug
(
"Bean with name '"
+
finalName
+
"' concluding interceptor chain "
+
"is not an advisor class: treating it as a target or TargetSource"
);
}
String
[]
newNames
=
new
String
[
this
.
interceptorNames
.
length
-
1
];
System
.
arraycopy
(
this
.
interceptorNames
,
0
,
newNames
,
0
,
newNames
.
length
);
this
.
interceptorNames
=
newNames
;
this
.
interceptorNames
=
Arrays
.
copyOf
(
this
.
interceptorNames
,
this
.
interceptorNames
.
length
-
1
);
}
}
}
...
...
spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
浏览文件 @
78d56dc6
...
...
@@ -25,6 +25,7 @@ import java.lang.reflect.InvocationTargetException;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Iterator
;
import
java.util.LinkedHashSet
;
...
...
@@ -721,8 +722,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
synchronized
(
this
)
{
if
(!
this
.
cached
)
{
if
(
arguments
!=
null
)
{
Object
[]
cachedMethodArguments
=
new
Object
[
paramTypes
.
length
];
System
.
arraycopy
(
descriptors
,
0
,
cachedMethodArguments
,
0
,
arguments
.
length
);
DependencyDescriptor
[]
cachedMethodArguments
=
Arrays
.
copyOf
(
descriptors
,
arguments
.
length
);
registerDependentBeans
(
beanName
,
autowiredBeans
);
if
(
autowiredBeans
.
size
()
==
paramTypes
.
length
)
{
Iterator
<
String
>
it
=
autowiredBeans
.
iterator
();
...
...
spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java
浏览文件 @
78d56dc6
...
...
@@ -268,8 +268,7 @@ final class AttributeMethods {
return
NONE
;
}
Arrays
.
sort
(
methods
,
methodComparator
);
Method
[]
attributeMethods
=
new
Method
[
size
];
System
.
arraycopy
(
methods
,
0
,
attributeMethods
,
0
,
size
);
Method
[]
attributeMethods
=
Arrays
.
copyOf
(
methods
,
size
);
return
new
AttributeMethods
(
annotationType
,
attributeMethods
);
}
...
...
spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java
浏览文件 @
78d56dc6
...
...
@@ -501,9 +501,7 @@ class Tokenizer {
}
private
char
[]
subarray
(
int
start
,
int
end
)
{
char
[]
result
=
new
char
[
end
-
start
];
System
.
arraycopy
(
this
.
charsToProcess
,
start
,
result
,
0
,
end
-
start
);
return
result
;
return
Arrays
.
copyOfRange
(
this
.
charsToProcess
,
start
,
end
);
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录