Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
1f3b595a
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 搜索 >>
提交
1f3b595a
编写于
11月 05, 2019
作者:
S
stsypanov
提交者:
Juergen Hoeller
11月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use String.isEmpty() instead of String.equals("")
上级
bb2e3ce6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
8 deletion
+8
-8
spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolver.java
.../factory/annotation/AnnotationBeanWiringInfoResolver.java
+1
-1
spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java
...va/org/springframework/mock/jndi/SimpleNamingContext.java
+2
-2
spring-web/src/main/java/org/springframework/http/codec/ServerSentEventHttpMessageReader.java
...ramework/http/codec/ServerSentEventHttpMessageReader.java
+1
-1
spring-web/src/main/java/org/springframework/http/server/DefaultPathContainer.java
...org/springframework/http/server/DefaultPathContainer.java
+2
-2
spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
...ava/org/springframework/web/util/pattern/PathPattern.java
+2
-2
未找到文件。
spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolver.java
浏览文件 @
1f3b595a
...
...
@@ -56,7 +56,7 @@ public class AnnotationBeanWiringInfoResolver implements BeanWiringInfoResolver
// Autowiring by name or by type
return
new
BeanWiringInfo
(
annotation
.
autowire
().
value
(),
annotation
.
dependencyCheck
());
}
else
if
(!
""
.
equals
(
annotation
.
value
()
))
{
else
if
(!
annotation
.
value
().
isEmpty
(
))
{
// Explicitly specified bean name for bean definition to take property values from
return
new
BeanWiringInfo
(
annotation
.
value
(),
false
);
}
...
...
spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java
浏览文件 @
1f3b595a
...
...
@@ -126,7 +126,7 @@ public class SimpleNamingContext implements Context {
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
"Static JNDI lookup: ["
+
name
+
"]"
);
}
if
(
""
.
equals
(
name
))
{
if
(
name
.
isEmpty
(
))
{
return
new
SimpleNamingContext
(
this
.
root
,
this
.
boundObjects
,
this
.
environment
);
}
Object
found
=
this
.
boundObjects
.
get
(
name
);
...
...
@@ -306,7 +306,7 @@ public class SimpleNamingContext implements Context {
private
Iterator
<
T
>
iterator
;
private
AbstractNamingEnumeration
(
SimpleNamingContext
context
,
String
proot
)
throws
NamingException
{
if
(!
""
.
equals
(
proot
)
&&
!
proot
.
endsWith
(
"/"
))
{
if
(!
proot
.
isEmpty
(
)
&&
!
proot
.
endsWith
(
"/"
))
{
proot
=
proot
+
"/"
;
}
String
root
=
context
.
root
+
proot
;
...
...
spring-web/src/main/java/org/springframework/http/codec/ServerSentEventHttpMessageReader.java
浏览文件 @
1f3b595a
...
...
@@ -105,7 +105,7 @@ public class ServerSentEventHttpMessageReader implements HttpMessageReader<Objec
ResolvableType
valueType
=
(
shouldWrap
?
elementType
.
getGeneric
()
:
elementType
);
return
stringDecoder
.
decode
(
message
.
getBody
(),
STRING_TYPE
,
null
,
hints
)
.
bufferUntil
(
line
->
line
.
equals
(
""
)
)
.
bufferUntil
(
String:
:
isEmpty
)
.
concatMap
(
lines
->
Mono
.
justOrEmpty
(
buildEvent
(
lines
,
valueType
,
shouldWrap
,
hints
)));
}
...
...
spring-web/src/main/java/org/springframework/http/server/DefaultPathContainer.java
浏览文件 @
1f3b595a
...
...
@@ -97,7 +97,7 @@ final class DefaultPathContainer implements PathContainer {
static
PathContainer
createFromUrlPath
(
String
path
,
Options
options
)
{
if
(
path
.
equals
(
""
))
{
if
(
path
.
isEmpty
(
))
{
return
EMPTY_PATH
;
}
char
separator
=
options
.
separator
();
...
...
@@ -117,7 +117,7 @@ final class DefaultPathContainer implements PathContainer {
while
(
begin
<
path
.
length
())
{
int
end
=
path
.
indexOf
(
separator
,
begin
);
String
segment
=
(
end
!=
-
1
?
path
.
substring
(
begin
,
end
)
:
path
.
substring
(
begin
));
if
(!
segment
.
equals
(
""
))
{
if
(!
segment
.
isEmpty
(
))
{
elements
.
add
(
options
.
shouldDecodeAndParseSegments
()
?
decodeAndParsePathSegment
(
segment
)
:
new
DefaultPathSegment
(
segment
,
separatorElement
));
...
...
spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
浏览文件 @
1f3b595a
...
...
@@ -411,8 +411,8 @@ public class PathPattern implements Comparable<PathPattern> {
int
dotPos2
=
p2string
.
indexOf
(
'.'
);
String
file2
=
(
dotPos2
==
-
1
?
p2string
:
p2string
.
substring
(
0
,
dotPos2
));
String
secondExtension
=
(
dotPos2
==
-
1
?
""
:
p2string
.
substring
(
dotPos2
));
boolean
firstExtensionWild
=
(
firstExtension
.
equals
(
".*"
)
||
firstExtension
.
equals
(
""
));
boolean
secondExtensionWild
=
(
secondExtension
.
equals
(
".*"
)
||
secondExtension
.
equals
(
""
));
boolean
firstExtensionWild
=
(
firstExtension
.
equals
(
".*"
)
||
firstExtension
.
isEmpty
(
));
boolean
secondExtensionWild
=
(
secondExtension
.
equals
(
".*"
)
||
secondExtension
.
isEmpty
(
));
if
(!
firstExtensionWild
&&
!
secondExtensionWild
)
{
throw
new
IllegalArgumentException
(
"Cannot combine patterns: "
+
this
.
patternString
+
" and "
+
pattern2string
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录