Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
6964ed33
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 搜索 >>
提交
6964ed33
编写于
5月 27, 2019
作者:
С
Сергей Цыпанов
提交者:
Sam Brannen
5月 27, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allocate objects only when it's necessary
Closes gh-23036
上级
6f2f5bb8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
4 deletion
+4
-4
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java
.../springframework/jdbc/core/simple/AbstractJdbcInsert.java
+1
-1
spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java
...framework/test/context/support/AbstractContextLoader.java
+1
-1
spring-test/src/main/java/org/springframework/test/context/support/TestPropertySourceAttributes.java
...rk/test/context/support/TestPropertySourceAttributes.java
+1
-1
spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java
...ansaction/support/AbstractPlatformTransactionManager.java
+1
-1
未找到文件。
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java
浏览文件 @
6964ed33
...
...
@@ -484,12 +484,12 @@ public abstract class AbstractJdbcInsert {
//Get the key
Statement
keyStmt
=
null
;
ResultSet
rs
=
null
;
Map
<
String
,
Object
>
keys
=
new
HashMap
<>(
2
);
try
{
keyStmt
=
con
.
createStatement
();
rs
=
keyStmt
.
executeQuery
(
keyQuery
);
if
(
rs
.
next
())
{
long
key
=
rs
.
getLong
(
1
);
Map
<
String
,
Object
>
keys
=
new
HashMap
<>(
2
);
keys
.
put
(
getGeneratedKeyNames
()[
0
],
key
);
keyHolder
.
getKeyList
().
add
(
keys
);
}
...
...
spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java
浏览文件 @
6964ed33
...
...
@@ -245,9 +245,9 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
for
(
String
suffix
:
suffixes
)
{
Assert
.
hasText
(
suffix
,
"Resource suffix must not be empty"
);
String
resourcePath
=
ClassUtils
.
convertClassNameToResourcePath
(
clazz
.
getName
())
+
suffix
;
String
prefixedResourcePath
=
ResourceUtils
.
CLASSPATH_URL_PREFIX
+
resourcePath
;
ClassPathResource
classPathResource
=
new
ClassPathResource
(
resourcePath
);
if
(
classPathResource
.
exists
())
{
String
prefixedResourcePath
=
ResourceUtils
.
CLASSPATH_URL_PREFIX
+
resourcePath
;
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
String
.
format
(
"Detected default resource location \"%s\" for test class [%s]"
,
prefixedResourcePath
,
clazz
.
getName
()));
...
...
spring-test/src/main/java/org/springframework/test/context/support/TestPropertySourceAttributes.java
浏览文件 @
6964ed33
...
...
@@ -156,10 +156,10 @@ class TestPropertySourceAttributes {
*/
private
static
String
detectDefaultPropertiesFile
(
Class
<?>
testClass
)
{
String
resourcePath
=
ClassUtils
.
convertClassNameToResourcePath
(
testClass
.
getName
())
+
".properties"
;
String
prefixedResourcePath
=
ResourceUtils
.
CLASSPATH_URL_PREFIX
+
resourcePath
;
ClassPathResource
classPathResource
=
new
ClassPathResource
(
resourcePath
);
if
(
classPathResource
.
exists
())
{
String
prefixedResourcePath
=
ResourceUtils
.
CLASSPATH_URL_PREFIX
+
resourcePath
;
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
String
.
format
(
"Detected default properties file \"%s\" for test class [%s]"
,
prefixedResourcePath
,
testClass
.
getName
()));
...
...
spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java
浏览文件 @
6964ed33
...
...
@@ -637,11 +637,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
private
void
resumeAfterBeginException
(
Object
transaction
,
@Nullable
SuspendedResourcesHolder
suspendedResources
,
Throwable
beginEx
)
{
String
exMessage
=
"Inner transaction begin exception overridden by outer transaction resume exception"
;
try
{
resume
(
transaction
,
suspendedResources
);
}
catch
(
RuntimeException
|
Error
resumeEx
)
{
String
exMessage
=
"Inner transaction begin exception overridden by outer transaction resume exception"
;
logger
.
error
(
exMessage
,
beginEx
);
throw
resumeEx
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录