Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
1295f623
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 搜索 >>
提交
1295f623
编写于
8月 17, 2016
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
b9a2d0af
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
20 deletion
+14
-20
spring-aop/src/test/java/org/springframework/tests/aop/interceptor/NopInterceptor.java
...springframework/tests/aop/interceptor/NopInterceptor.java
+4
-4
spring-aop/src/test/java/org/springframework/tests/sample/beans/SerializablePerson.java
...pringframework/tests/sample/beans/SerializablePerson.java
+9
-8
spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverterTests.java
...nverter/xml/Jaxb2CollectionHttpMessageConverterTests.java
+1
-8
未找到文件。
spring-aop/src/test/java/org/springframework/tests/aop/interceptor/NopInterceptor.java
浏览文件 @
1295f623
...
...
@@ -35,12 +35,12 @@ public class NopInterceptor implements MethodInterceptor {
return
invocation
.
proceed
();
}
p
ublic
int
getCou
nt
()
{
return
this
.
count
;
p
rotected
void
increme
nt
()
{
this
.
count
++
;
}
p
rotected
void
increme
nt
()
{
++
count
;
p
ublic
int
getCou
nt
()
{
return
this
.
count
;
}
...
...
spring-aop/src/test/java/org/springframework/tests/sample/beans/SerializablePerson.java
浏览文件 @
1295f623
...
...
@@ -34,23 +34,23 @@ public class SerializablePerson implements Person, Serializable {
@Override
public
int
getAg
e
()
{
return
ag
e
;
public
String
getNam
e
()
{
return
nam
e
;
}
@Override
public
void
set
Age
(
int
ag
e
)
{
this
.
age
=
ag
e
;
public
void
set
Name
(
String
nam
e
)
{
this
.
name
=
nam
e
;
}
@Override
public
String
getNam
e
()
{
return
nam
e
;
public
int
getAg
e
()
{
return
ag
e
;
}
@Override
public
void
set
Name
(
String
nam
e
)
{
this
.
name
=
nam
e
;
public
void
set
Age
(
int
ag
e
)
{
this
.
age
=
ag
e
;
}
@Override
...
...
@@ -62,6 +62,7 @@ public class SerializablePerson implements Person, Serializable {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(!(
other
instanceof
SerializablePerson
))
{
return
false
;
...
...
spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverterTests.java
浏览文件 @
1295f623
...
...
@@ -83,7 +83,6 @@ public class Jaxb2CollectionHttpMessageConverterTests {
public
void
readXmlRootElementList
()
throws
Exception
{
String
content
=
"<list><rootElement><type s=\"1\"/></rootElement><rootElement><type s=\"2\"/></rootElement></list>"
;
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
content
.
getBytes
(
"UTF-8"
));
List
<
RootElement
>
result
=
(
List
<
RootElement
>)
converter
.
read
(
rootElementListType
,
null
,
inputMessage
);
assertEquals
(
"Invalid result"
,
2
,
result
.
size
());
...
...
@@ -96,7 +95,6 @@ public class Jaxb2CollectionHttpMessageConverterTests {
public
void
readXmlRootElementSet
()
throws
Exception
{
String
content
=
"<set><rootElement><type s=\"1\"/></rootElement><rootElement><type s=\"2\"/></rootElement></set>"
;
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
content
.
getBytes
(
"UTF-8"
));
Set
<
RootElement
>
result
=
(
Set
<
RootElement
>)
converter
.
read
(
rootElementSetType
,
null
,
inputMessage
);
assertEquals
(
"Invalid result"
,
2
,
result
.
size
());
...
...
@@ -109,7 +107,6 @@ public class Jaxb2CollectionHttpMessageConverterTests {
public
void
readXmlTypeList
()
throws
Exception
{
String
content
=
"<list><foo s=\"1\"/><bar s=\"2\"/></list>"
;
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
content
.
getBytes
(
"UTF-8"
));
List
<
TestType
>
result
=
(
List
<
TestType
>)
converter
.
read
(
typeListType
,
null
,
inputMessage
);
assertEquals
(
"Invalid result"
,
2
,
result
.
size
());
...
...
@@ -122,7 +119,6 @@ public class Jaxb2CollectionHttpMessageConverterTests {
public
void
readXmlTypeSet
()
throws
Exception
{
String
content
=
"<set><foo s=\"1\"/><bar s=\"2\"/></set>"
;
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
content
.
getBytes
(
"UTF-8"
));
Set
<
TestType
>
result
=
(
Set
<
TestType
>)
converter
.
read
(
typeSetType
,
null
,
inputMessage
);
assertEquals
(
"Invalid result"
,
2
,
result
.
size
());
...
...
@@ -133,7 +129,6 @@ public class Jaxb2CollectionHttpMessageConverterTests {
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
readXmlRootElementExternalEntityDisabled
()
throws
Exception
{
Resource
external
=
new
ClassPathResource
(
"external.txt"
,
getClass
());
String
content
=
"<!DOCTYPE root ["
+
" <!ELEMENT external ANY >\n"
+
...
...
@@ -142,7 +137,6 @@ public class Jaxb2CollectionHttpMessageConverterTests {
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
content
.
getBytes
(
"UTF-8"
));
converter
=
new
Jaxb2CollectionHttpMessageConverter
<
Collection
<
Object
>>()
{
@Override
protected
XMLInputFactory
createXmlInputFactory
()
{
XMLInputFactory
inputFactory
=
super
.
createXmlInputFactory
();
...
...
@@ -164,7 +158,6 @@ public class Jaxb2CollectionHttpMessageConverterTests {
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
readXmlRootElementExternalEntityEnabled
()
throws
Exception
{
Resource
external
=
new
ClassPathResource
(
"external.txt"
,
getClass
());
String
content
=
"<!DOCTYPE root ["
+
" <!ELEMENT external ANY >\n"
+
...
...
@@ -278,4 +271,4 @@ public class Jaxb2CollectionHttpMessageConverterTests {
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录