Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
39201adc
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,发现更多精彩内容 >>
提交
39201adc
编写于
2月 10, 2018
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Consistent handling of InterruptedException
Issue: SPR-16479
上级
6ea0af35
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
13 addition
and
9 deletion
+13
-9
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
...ringframework/scheduling/quartz/SchedulerFactoryBean.java
+1
-0
spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
...gframework/orm/hibernate5/LocalSessionFactoryBuilder.java
+3
-3
spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
...ngframework/orm/jpa/AbstractEntityManagerFactoryBean.java
+2
-2
spring-test/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java
...rg/springframework/test/web/servlet/DefaultMvcResult.java
+2
-1
spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequest.java
.../springframework/http/client/Netty4ClientHttpRequest.java
+3
-2
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java
...mework/web/socket/sockjs/client/UndertowXhrTransport.java
+2
-1
未找到文件。
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
浏览文件 @
39201adc
...
...
@@ -700,6 +700,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
Thread
.
sleep
(
startupDelay
*
1000
);
}
catch
(
InterruptedException
ex
)
{
Thread
.
currentThread
().
interrupt
();
// simply proceed
}
if
(
logger
.
isInfoEnabled
())
{
...
...
spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
浏览文件 @
39201adc
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
8
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.
...
...
@@ -421,8 +421,8 @@ public class LocalSessionFactoryBuilder extends Configuration {
return
this
.
sessionFactoryFuture
.
get
();
}
catch
(
InterruptedException
ex
)
{
throw
new
IllegalStateException
(
"Interrupted during initialization of Hibernate SessionFactory: "
+
ex
.
getMessage
()
);
Thread
.
currentThread
().
interrupt
();
throw
new
IllegalStateException
(
"Interrupted during initialization of Hibernate SessionFactory"
,
ex
);
}
catch
(
ExecutionException
ex
)
{
throw
new
IllegalStateException
(
"Failed to asynchronously initialize Hibernate SessionFactory: "
+
...
...
spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
浏览文件 @
39201adc
...
...
@@ -519,8 +519,8 @@ public abstract class AbstractEntityManagerFactoryBean implements
return
this
.
nativeEntityManagerFactoryFuture
.
get
();
}
catch
(
InterruptedException
ex
)
{
throw
new
IllegalStateException
(
"Interrupted during initialization of native EntityManagerFactory: "
+
ex
.
getMessage
()
);
Thread
.
currentThread
().
interrupt
();
throw
new
IllegalStateException
(
"Interrupted during initialization of native EntityManagerFactory"
,
ex
);
}
catch
(
ExecutionException
ex
)
{
throw
new
IllegalStateException
(
"Failed to asynchronously initialize native EntityManagerFactory: "
+
...
...
spring-test/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java
浏览文件 @
39201adc
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
8
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.
...
...
@@ -143,6 +143,7 @@ class DefaultMvcResult implements MvcResult {
Thread
.
sleep
(
100
);
}
catch
(
InterruptedException
ex
)
{
Thread
.
currentThread
().
interrupt
();
throw
new
IllegalStateException
(
"Interrupted while waiting for "
+
"async result to be set for handler ["
+
this
.
handler
+
"]"
,
ex
);
}
...
...
spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequest.java
浏览文件 @
39201adc
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
8
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.
...
...
@@ -93,7 +93,8 @@ class Netty4ClientHttpRequest extends AbstractAsyncClientHttpRequest implements
return
executeAsync
().
get
();
}
catch
(
InterruptedException
ex
)
{
throw
new
IOException
(
ex
.
getMessage
(),
ex
);
Thread
.
currentThread
().
interrupt
();
throw
new
IOException
(
"Interrupted during request execution"
,
ex
);
}
catch
(
ExecutionException
ex
)
{
if
(
ex
.
getCause
()
instanceof
IOException
)
{
...
...
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java
浏览文件 @
39201adc
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
8
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.
...
...
@@ -300,6 +300,7 @@ public class UndertowXhrTransport extends AbstractXhrTransport {
throw
new
SockJsTransportFailureException
(
"Failed to execute request to "
+
url
,
ex
);
}
catch
(
InterruptedException
ex
)
{
Thread
.
currentThread
().
interrupt
();
throw
new
SockJsTransportFailureException
(
"Interrupted while processing request to "
+
url
,
ex
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录