Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
ce42ed4d
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,发现更多精彩内容 >>
提交
ce42ed4d
编写于
9月 13, 2016
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
c69e6a36
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
16 deletion
+14
-16
spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java
...va/org/springframework/format/datetime/DateFormatter.java
+1
-1
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java
...ngframework/expression/spel/support/ReflectionHelper.java
+1
-1
spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java
...java/org/springframework/dao/support/DataAccessUtils.java
+6
-6
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java
...on/ModelAndViewResolverMethodReturnValueHandlerTests.java
+3
-2
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java
...tation/ServletAnnotationControllerHandlerMethodTests.java
+3
-6
未找到文件。
spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java
浏览文件 @
ce42ed4d
...
...
@@ -191,7 +191,7 @@ public class DateFormatter implements Formatter<Date> {
if
(
timeStyle
!=
-
1
)
{
return
DateFormat
.
getTimeInstance
(
timeStyle
,
locale
);
}
throw
new
IllegalStateException
(
"Unsupported style pattern '"
+
this
.
stylePattern
+
"'"
);
throw
new
IllegalStateException
(
"Unsupported style pattern '"
+
this
.
stylePattern
+
"'"
);
}
return
DateFormat
.
getDateInstance
(
this
.
style
,
locale
);
...
...
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java
浏览文件 @
ce42ed4d
...
...
@@ -195,7 +195,7 @@ public class ReflectionHelper {
TypeDescriptor
varargsDesc
=
expectedArgTypes
.
get
(
expectedArgTypes
.
size
()
-
1
);
Class
<?>
varargsParamType
=
varargsDesc
.
getElementTypeDescriptor
().
getType
();
// All remaining parameters must be of this type or convert
a
ble to this type
// All remaining parameters must be of this type or convert
i
ble to this type
for
(
int
i
=
expectedArgTypes
.
size
()
-
1
;
i
<
suppliedArgTypes
.
size
();
i
++)
{
TypeDescriptor
suppliedArg
=
suppliedArgTypes
.
get
(
i
);
if
(
suppliedArg
==
null
)
{
...
...
spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java
浏览文件 @
ce42ed4d
/*
* Copyright 2002-201
2
the original author or authors.
* Copyright 2002-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -122,7 +122,7 @@ public abstract class DataAccessUtils {
/**
* Return a unique result object from the given Collection.
* Throws an exception if 0 or more than 1 result objects found,
* of if the unique result object is not convert
a
ble to the
* of if the unique result object is not convert
i
ble to the
* specified required type.
* @param results the result Collection (can be {@code null})
* @return the unique result object
...
...
@@ -162,7 +162,7 @@ public abstract class DataAccessUtils {
/**
* Return a unique int result from the given Collection.
* Throws an exception if 0 or more than 1 result objects found,
* of if the unique result object is not convert
a
ble to an int.
* of if the unique result object is not convert
i
ble to an int.
* @param results the result Collection (can be {@code null})
* @return the unique int result
* @throws IncorrectResultSizeDataAccessException if more than one
...
...
@@ -170,7 +170,7 @@ public abstract class DataAccessUtils {
* @throws EmptyResultDataAccessException if no result object
* at all has been found in the given Collection
* @throws TypeMismatchDataAccessException if the unique object
* in the collection is not convert
a
ble to an int
* in the collection is not convert
i
ble to an int
*/
public
static
int
intResult
(
Collection
<?>
results
)
throws
IncorrectResultSizeDataAccessException
,
TypeMismatchDataAccessException
{
...
...
@@ -181,7 +181,7 @@ public abstract class DataAccessUtils {
/**
* Return a unique long result from the given Collection.
* Throws an exception if 0 or more than 1 result objects found,
* of if the unique result object is not convert
a
ble to a long.
* of if the unique result object is not convert
i
ble to a long.
* @param results the result Collection (can be {@code null})
* @return the unique long result
* @throws IncorrectResultSizeDataAccessException if more than one
...
...
@@ -189,7 +189,7 @@ public abstract class DataAccessUtils {
* @throws EmptyResultDataAccessException if no result object
* at all has been found in the given Collection
* @throws TypeMismatchDataAccessException if the unique object
* in the collection is not convert
a
ble to a long
* in the collection is not convert
i
ble to a long
*/
public
static
long
longResult
(
Collection
<?>
results
)
throws
IncorrectResultSizeDataAccessException
,
TypeMismatchDataAccessException
{
...
...
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java
浏览文件 @
ce42ed4d
...
...
@@ -126,8 +126,9 @@ public class ModelAndViewResolverMethodReturnValueHandlerTests {
@Override
@SuppressWarnings
(
"rawtypes"
)
public
ModelAndView
resolveModelAndView
(
Method
method
,
Class
handlerType
,
Object
returnValue
,
public
ModelAndView
resolveModelAndView
(
Method
method
,
Class
<?>
handlerType
,
Object
returnValue
,
ExtendedModelMap
model
,
NativeWebRequest
request
)
{
if
(
returnValue
!=
null
&&
returnValue
.
getClass
().
equals
(
returnValueType
))
{
return
new
ModelAndView
(
"viewName"
,
"modelAttrName"
,
returnValue
);
}
...
...
@@ -137,4 +138,4 @@ public class ModelAndViewResolverMethodReturnValueHandlerTests {
}
}
}
\ No newline at end of file
}
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java
浏览文件 @
ce42ed4d
...
...
@@ -2851,18 +2851,15 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
@Override
@SuppressWarnings
(
"rawtypes"
)
public
ModelAndView
resolveModelAndView
(
Method
handlerMethod
,
Class
handlerType
,
Object
returnValue
,
ExtendedModelMap
implicitModel
,
NativeWebRequest
webRequest
)
{
public
ModelAndView
resolveModelAndView
(
Method
handlerMethod
,
Class
<?>
handlerType
,
Object
returnValue
,
ExtendedModelMap
implicitModel
,
NativeWebRequest
webRequest
)
{
if
(
returnValue
instanceof
MySpecialArg
)
{
return
new
ModelAndView
(
new
View
()
{
@Override
public
String
getContentType
()
{
return
"text/html"
;
}
@Override
public
void
render
(
Map
<
String
,
?>
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录