Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
345b9649
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
345b9649
编写于
2月 20, 2019
作者:
J
Josh Soref
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Java 7: identical multi-catch sections
上级
385cfb08
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
40 addition
and
141 deletion
+40
-141
core/src/main/java/hudson/ExtensionComponent.java
core/src/main/java/hudson/ExtensionComponent.java
+1
-3
core/src/main/java/hudson/lifecycle/UnixLifecycle.java
core/src/main/java/hudson/lifecycle/UnixLifecycle.java
+2
-5
core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java
.../src/main/java/hudson/lifecycle/WindowsInstallerLink.java
+1
-3
core/src/main/java/hudson/model/AbstractBuild.java
core/src/main/java/hudson/model/AbstractBuild.java
+3
-11
core/src/main/java/hudson/model/ItemGroupMixIn.java
core/src/main/java/hudson/model/ItemGroupMixIn.java
+2
-8
core/src/main/java/hudson/model/JDK.java
core/src/main/java/hudson/model/JDK.java
+1
-3
core/src/main/java/hudson/model/Run.java
core/src/main/java/hudson/model/Run.java
+1
-3
core/src/main/java/hudson/model/RunMap.java
core/src/main/java/hudson/model/RunMap.java
+1
-5
core/src/main/java/hudson/model/UpdateSite.java
core/src/main/java/hudson/model/UpdateSite.java
+1
-5
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
+2
-7
core/src/main/java/hudson/model/queue/Latch.java
core/src/main/java/hudson/model/queue/Latch.java
+1
-4
core/src/main/java/hudson/node_monitors/AbstractAsyncNodeMonitorDescriptor.java
...son/node_monitors/AbstractAsyncNodeMonitorDescriptor.java
+2
-8
core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java
...a/hudson/node_monitors/AbstractNodeMonitorDescriptor.java
+1
-3
core/src/main/java/hudson/scm/SCMDescriptor.java
core/src/main/java/hudson/scm/SCMDescriptor.java
+1
-3
core/src/main/java/hudson/security/TokenBasedRememberMeServices2.java
...n/java/hudson/security/TokenBasedRememberMeServices2.java
+1
-3
core/src/main/java/hudson/tasks/Shell.java
core/src/main/java/hudson/tasks/Shell.java
+1
-3
core/src/main/java/hudson/util/ClockDifference.java
core/src/main/java/hudson/util/ClockDifference.java
+1
-3
core/src/main/java/hudson/util/CopyOnWriteList.java
core/src/main/java/hudson/util/CopyOnWriteList.java
+1
-3
core/src/main/java/hudson/util/RobustCollectionConverter.java
.../src/main/java/hudson/util/RobustCollectionConverter.java
+1
-3
core/src/main/java/hudson/util/RobustMapConverter.java
core/src/main/java/hudson/util/RobustMapConverter.java
+1
-4
core/src/main/java/hudson/util/Secret.java
core/src/main/java/hudson/util/Secret.java
+1
-3
core/src/main/java/hudson/util/Service.java
core/src/main/java/hudson/util/Service.java
+1
-5
core/src/main/java/hudson/util/XStream2.java
core/src/main/java/hudson/util/XStream2.java
+1
-5
core/src/main/java/hudson/util/xstream/ImmutableListConverter.java
...main/java/hudson/util/xstream/ImmutableListConverter.java
+2
-4
core/src/main/java/hudson/widgets/RenderOnDemandClosure.java
core/src/main/java/hudson/widgets/RenderOnDemandClosure.java
+1
-3
core/src/main/java/jenkins/PluginSubtypeMarker.java
core/src/main/java/jenkins/PluginSubtypeMarker.java
+1
-4
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/model/Jenkins.java
+0
-3
core/src/main/java/jenkins/model/PeepholePermalink.java
core/src/main/java/jenkins/model/PeepholePermalink.java
+1
-4
core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java
core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java
+1
-5
core/src/main/java/jenkins/security/ExceptionTranslationFilter.java
...ain/java/jenkins/security/ExceptionTranslationFilter.java
+2
-6
core/src/main/java/jenkins/security/HMACConfidentialKey.java
core/src/main/java/jenkins/security/HMACConfidentialKey.java
+1
-3
core/src/main/java/jenkins/security/ImpersonatingUserDetailsService.java
...ava/jenkins/security/ImpersonatingUserDetailsService.java
+1
-3
core/src/main/java/jenkins/security/RSAConfidentialKey.java
core/src/main/java/jenkins/security/RSAConfidentialKey.java
+1
-3
未找到文件。
core/src/main/java/hudson/ExtensionComponent.java
浏览文件 @
345b9649
...
...
@@ -95,9 +95,7 @@ public class ExtensionComponent<T> implements Comparable<ExtensionComponent<T>>
if
(
this
.
instance
instanceof
Descriptor
&&
that
.
instance
instanceof
Descriptor
)
{
try
{
return
Util
.
fixNull
(((
Descriptor
)
this
.
instance
).
getDisplayName
()).
compareTo
(
Util
.
fixNull
(((
Descriptor
)
that
.
instance
).
getDisplayName
()));
}
catch
(
RuntimeException
x
)
{
LOG
.
log
(
Level
.
WARNING
,
null
,
x
);
}
catch
(
LinkageError
x
)
{
}
catch
(
RuntimeException
|
LinkageError
x
)
{
LOG
.
log
(
Level
.
WARNING
,
null
,
x
);
}
}
...
...
core/src/main/java/hudson/lifecycle/UnixLifecycle.java
浏览文件 @
345b9649
...
...
@@ -56,11 +56,8 @@ public class UnixLifecycle extends Lifecycle {
// if we are running as daemon, don't fork into background one more time during restart
args
.
remove
(
"--daemon"
);
}
catch
(
UnsupportedOperationException
e
)
{
// can't restart
failedToObtainArgs
=
e
;
}
catch
(
LinkageError
e
)
{
// see HUDSON-3875
}
catch
(
UnsupportedOperationException
|
LinkageError
e
)
{
// can't restart / see HUDSON-3875
failedToObtainArgs
=
e
;
}
}
...
...
core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java
浏览文件 @
345b9649
...
...
@@ -215,9 +215,7 @@ public class WindowsInstallerLink extends ManagementLink {
int
r
=
runElevated
(
new
File
(
installationDir
,
"jenkins.exe"
),
"start"
,
task
,
installationDir
);
task
.
getLogger
().
println
(
r
==
0
?
"Successfully started"
:
"start service failed. Exit code="
+
r
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
InterruptedException
e
)
{
}
catch
(
IOException
|
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
...
...
core/src/main/java/hudson/model/AbstractBuild.java
浏览文件 @
345b9649
...
...
@@ -694,10 +694,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
setResult
(
Result
.
FAILURE
);
}
}
}
catch
(
Exception
e
)
{
reportError
(
bs
,
e
,
listener
,
phase
);
r
=
false
;
}
catch
(
LinkageError
e
)
{
}
catch
(
Exception
|
LinkageError
e
)
{
reportError
(
bs
,
e
,
listener
,
phase
);
r
=
false
;
}
...
...
@@ -742,10 +739,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
try
{
canContinue
=
mon
.
perform
(
bs
,
AbstractBuild
.
this
,
launcher
,
listener
);
}
catch
(
RequestAbortedException
ex
)
{
// Channel is closed, do not continue
reportBrokenChannel
(
listener
);
}
catch
(
ChannelClosedException
ex
)
{
}
catch
(
RequestAbortedException
|
ChannelClosedException
ex
)
{
// Channel is closed, do not continue
reportBrokenChannel
(
listener
);
}
catch
(
RuntimeException
ex
)
{
...
...
@@ -859,9 +853,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
try
{
return
scm
.
parse
(
this
,
changelogFile
);
}
catch
(
IOException
e
)
{
LOGGER
.
log
(
WARNING
,
"Failed to parse "
+
changelogFile
,
e
);
}
catch
(
SAXException
e
)
{
}
catch
(
IOException
|
SAXException
e
)
{
LOGGER
.
log
(
WARNING
,
"Failed to parse "
+
changelogFile
,
e
);
}
return
ChangeLogSet
.
createEmpty
(
this
);
...
...
core/src/main/java/hudson/model/ItemGroupMixIn.java
浏览文件 @
345b9649
...
...
@@ -290,16 +290,10 @@ public abstract class ItemGroupMixIn {
Jenkins
.
getInstance
().
rebuildDependencyGraphAsync
();
return
result
;
}
catch
(
TransformerException
e
)
{
}
catch
(
TransformerException
|
SAXException
e
)
{
success
=
false
;
throw
new
IOException
(
"Failed to persist config.xml"
,
e
);
}
catch
(
SAXException
e
)
{
success
=
false
;
throw
new
IOException
(
"Failed to persist config.xml"
,
e
);
}
catch
(
IOException
e
)
{
success
=
false
;
throw
e
;
}
catch
(
RuntimeException
e
)
{
}
catch
(
IOException
|
RuntimeException
e
)
{
success
=
false
;
throw
e
;
}
finally
{
...
...
core/src/main/java/hudson/model/JDK.java
浏览文件 @
345b9649
...
...
@@ -163,9 +163,7 @@ public final class JDK extends ToolInstallation implements NodeSpecific<JDK>, En
TaskListener
listener
=
new
StreamTaskListener
(
new
NullStream
());
Launcher
launcher
=
n
.
createLauncher
(
listener
);
return
launcher
.
launch
().
cmds
(
"java"
,
"-fullversion"
).
stdout
(
listener
).
join
()==
0
;
}
catch
(
IOException
e
)
{
return
false
;
}
catch
(
InterruptedException
e
)
{
}
catch
(
IOException
|
InterruptedException
e
)
{
return
false
;
}
}
...
...
core/src/main/java/hudson/model/Run.java
浏览文件 @
345b9649
...
...
@@ -2335,9 +2335,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
LOGGER
.
log
(
WARNING
,
"deprecated call to Run.getEnvVars\n\tat {0}"
,
new
Throwable
().
getStackTrace
()[
1
]);
try
{
return
getEnvironment
(
new
LogTaskListener
(
LOGGER
,
Level
.
INFO
));
}
catch
(
IOException
e
)
{
return
new
EnvVars
();
}
catch
(
InterruptedException
e
)
{
}
catch
(
IOException
|
InterruptedException
e
)
{
return
new
EnvVars
();
}
}
...
...
core/src/main/java/hudson/model/RunMap.java
浏览文件 @
345b9649
...
...
@@ -227,11 +227,7 @@ public final class RunMap<R extends Run<?,R>> extends AbstractLazyLoadRunMap<R>
LOGGER
.
log
(
FINEST
,
"Loaded "
+
b
.
getFullDisplayName
()
+
" in "
+
Thread
.
currentThread
().
getName
(),
new
ThisIsHowItsLoaded
());
}
return
b
;
}
catch
(
IOException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"could not load "
+
d
,
e
);
}
catch
(
InstantiationError
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"could not load "
+
d
,
e
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
|
InstantiationError
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"could not load "
+
d
,
e
);
}
}
...
...
core/src/main/java/hudson/model/UpdateSite.java
浏览文件 @
345b9649
...
...
@@ -335,11 +335,7 @@ public class UpdateSite {
if
(
df
.
exists
())
{
try
{
return
JSONObject
.
fromObject
(
df
.
read
());
}
catch
(
JSONException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"Failed to parse "
+
df
,
e
);
df
.
delete
();
// if we keep this file, it will cause repeated failures
return
null
;
}
catch
(
IOException
e
)
{
}
catch
(
JSONException
|
IOException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"Failed to parse "
+
df
,
e
);
df
.
delete
();
// if we keep this file, it will cause repeated failures
return
null
;
...
...
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
浏览文件 @
345b9649
...
...
@@ -82,10 +82,7 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
boolean
check
;
try
{
check
=
shouldBeDeleted
(
item
,
ws
,
node
);
}
catch
(
IOException
x
)
{
Functions
.
printStackTrace
(
x
,
listener
.
error
(
"Failed to check "
+
node
.
getDisplayName
()));
continue
;
}
catch
(
InterruptedException
x
)
{
}
catch
(
IOException
|
InterruptedException
x
)
{
Functions
.
printStackTrace
(
x
,
listener
.
error
(
"Failed to check "
+
node
.
getDisplayName
()));
continue
;
}
...
...
@@ -94,9 +91,7 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
try
{
ws
.
deleteRecursive
();
WorkspaceList
.
tempDir
(
ws
).
deleteRecursive
();
}
catch
(
IOException
x
)
{
Functions
.
printStackTrace
(
x
,
listener
.
error
(
"Failed to delete "
+
ws
+
" on "
+
node
.
getDisplayName
()));
}
catch
(
InterruptedException
x
)
{
}
catch
(
IOException
|
InterruptedException
x
)
{
Functions
.
printStackTrace
(
x
,
listener
.
error
(
"Failed to delete "
+
ws
+
" on "
+
node
.
getDisplayName
()));
}
}
...
...
core/src/main/java/hudson/model/queue/Latch.java
浏览文件 @
345b9649
...
...
@@ -75,10 +75,7 @@ class Latch {
try
{
onCriteriaMet
();
}
catch
(
Error
e
)
{
abort
(
e
);
throw
e
;
}
catch
(
RuntimeException
e
)
{
}
catch
(
Error
|
RuntimeException
e
)
{
abort
(
e
);
throw
e
;
}
...
...
core/src/main/java/hudson/node_monitors/AbstractAsyncNodeMonitorDescriptor.java
浏览文件 @
345b9649
...
...
@@ -92,9 +92,7 @@ public abstract class AbstractAsyncNodeMonitorDescriptor<T> extends AbstractNode
if
(
cc
!=
null
)
futures
.
put
(
c
,
ch
.
callAsync
(
cc
));
}
}
catch
(
RuntimeException
e
)
{
LOGGER
.
log
(
WARNING
,
"Failed to monitor "
+
c
.
getDisplayName
()+
" for "
+
getDisplayName
(),
e
);
}
catch
(
IOException
e
)
{
}
catch
(
RuntimeException
|
IOException
e
)
{
LOGGER
.
log
(
WARNING
,
"Failed to monitor "
+
c
.
getDisplayName
()+
" for "
+
getDisplayName
(),
e
);
}
}
...
...
@@ -112,11 +110,7 @@ public abstract class AbstractAsyncNodeMonitorDescriptor<T> extends AbstractNode
if
(
f
!=
null
)
{
try
{
data
.
put
(
c
,
f
.
get
(
Math
.
max
(
0
,
end
-
System
.
currentTimeMillis
()),
MILLISECONDS
));
}
catch
(
RuntimeException
x
)
{
LOGGER
.
log
(
WARNING
,
"Failed to monitor "
+
c
.
getDisplayName
()
+
" for "
+
getDisplayName
(),
x
);
}
catch
(
ExecutionException
x
)
{
LOGGER
.
log
(
WARNING
,
"Failed to monitor "
+
c
.
getDisplayName
()
+
" for "
+
getDisplayName
(),
x
);
}
catch
(
TimeoutException
x
)
{
}
catch
(
RuntimeException
|
TimeoutException
|
ExecutionException
x
)
{
LOGGER
.
log
(
WARNING
,
"Failed to monitor "
+
c
.
getDisplayName
()
+
" for "
+
getDisplayName
(),
x
);
}
}
else
{
...
...
core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java
浏览文件 @
345b9649
...
...
@@ -149,9 +149,7 @@ public abstract class AbstractNodeMonitorDescriptor<T> extends Descriptor<NodeMo
data
.
put
(
c
,
null
);
else
data
.
put
(
c
,
monitor
(
c
));
}
catch
(
RuntimeException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to monitor "
+
c
.
getDisplayName
()+
" for "
+
getDisplayName
(),
e
);
}
catch
(
IOException
e
)
{
}
catch
(
RuntimeException
|
IOException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to monitor "
+
c
.
getDisplayName
()+
" for "
+
getDisplayName
(),
e
);
}
catch
(
InterruptedException
e
)
{
throw
(
InterruptedException
)
new
InterruptedException
(
"Node monitoring "
+
c
.
getDisplayName
()+
" for "
+
getDisplayName
()+
" aborted."
).
initCause
(
e
);
...
...
core/src/main/java/hudson/scm/SCMDescriptor.java
浏览文件 @
345b9649
...
...
@@ -86,9 +86,7 @@ public abstract class SCMDescriptor<T extends SCM> extends Descriptor<SCM> {
Field
f
=
SCMDescriptor
.
class
.
getDeclaredField
(
"repositoryBrowser"
);
f
.
setAccessible
(
true
);
f
.
set
(
this
,
rb
);
}
catch
(
NoSuchFieldException
e
)
{
LOGGER
.
log
(
WARNING
,
"Failed to overwrite the repositoryBrowser field"
,
e
);
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
NoSuchFieldException
|
IllegalAccessException
e
)
{
LOGGER
.
log
(
WARNING
,
"Failed to overwrite the repositoryBrowser field"
,
e
);
}
}
...
...
core/src/main/java/hudson/security/TokenBasedRememberMeServices2.java
浏览文件 @
345b9649
...
...
@@ -311,9 +311,7 @@ public class TokenBasedRememberMeServices2 extends TokenBasedRememberMeServices
if
(
SET_HTTP_ONLY
!=
null
)
{
try
{
SET_HTTP_ONLY
.
invoke
(
cookie
,
true
);
}
catch
(
IllegalAccessException
e
)
{
// ignore
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
InvocationTargetException
e
)
{
// ignore
}
}
...
...
core/src/main/java/hudson/tasks/Shell.java
浏览文件 @
345b9649
...
...
@@ -165,9 +165,7 @@ public class Shell extends CommandInterpreter {
String
interpreter
=
null
;
try
{
interpreter
=
channel
.
call
(
new
Shellinterpreter
());
}
catch
(
IOException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
null
,
e
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
IOException
|
InterruptedException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
null
,
e
);
}
if
(
interpreter
==
null
)
{
...
...
core/src/main/java/hudson/util/ClockDifference.java
浏览文件 @
345b9649
...
...
@@ -95,9 +95,7 @@ public final class ClockDifference {
try
{
if
(
d
==
null
)
return
FAILED_HTML
;
return
d
.
getClockDifference
().
toHtml
();
}
catch
(
IOException
e
)
{
return
FAILED_HTML
;
}
catch
(
InterruptedException
e
)
{
}
catch
(
IOException
|
InterruptedException
e
)
{
return
FAILED_HTML
;
}
}
...
...
core/src/main/java/hudson/util/CopyOnWriteList.java
浏览文件 @
345b9649
...
...
@@ -198,9 +198,7 @@ public class CopyOnWriteList<E> implements Iterable<E> {
items
.
add
(
item
);
}
catch
(
CriticalXStreamException
e
)
{
throw
e
;
}
catch
(
XStreamException
e
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
e
);
}
catch
(
LinkageError
e
)
{
}
catch
(
XStreamException
|
LinkageError
e
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
e
);
}
reader
.
moveUp
();
...
...
core/src/main/java/hudson/util/RobustCollectionConverter.java
浏览文件 @
345b9649
...
...
@@ -86,9 +86,7 @@ public class RobustCollectionConverter extends CollectionConverter {
collection
.
add
(
item
);
}
catch
(
CriticalXStreamException
e
)
{
throw
e
;
}
catch
(
XStreamException
e
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
e
);
}
catch
(
LinkageError
e
)
{
}
catch
(
XStreamException
|
LinkageError
e
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
e
);
}
reader
.
moveUp
();
...
...
core/src/main/java/hudson/util/RobustMapConverter.java
浏览文件 @
345b9649
...
...
@@ -58,10 +58,7 @@ final class RobustMapConverter extends MapConverter {
return
readItem
(
reader
,
context
,
map
);
}
catch
(
CriticalXStreamException
x
)
{
throw
x
;
}
catch
(
XStreamException
x
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
x
);
return
ERROR
;
}
catch
(
LinkageError
x
)
{
}
catch
(
XStreamException
|
LinkageError
x
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
x
);
return
ERROR
;
}
finally
{
...
...
core/src/main/java/hudson/util/Secret.java
浏览文件 @
345b9649
...
...
@@ -210,11 +210,9 @@ public final class Secret implements Serializable {
}
else
{
try
{
return
HistoricalSecrets
.
decrypt
(
data
,
KEY
);
}
catch
(
GeneralSecurityException
e
)
{
return
null
;
}
catch
(
UnsupportedEncodingException
e
)
{
throw
new
Error
(
e
);
// impossible
}
catch
(
IOException
e
)
{
}
catch
(
GeneralSecurityException
|
IOException
e
)
{
return
null
;
}
}
...
...
core/src/main/java/hudson/util/Service.java
浏览文件 @
345b9649
...
...
@@ -62,11 +62,7 @@ public class Service {
if
(!
type
.
isAssignableFrom
(
t
))
continue
;
// invalid type
result
.
add
(
type
.
cast
(
t
.
newInstance
()));
}
catch
(
ClassNotFoundException
x
)
{
LOGGER
.
log
(
WARNING
,
"Failed to load "
+
line
,
x
);
}
catch
(
InstantiationException
x
)
{
LOGGER
.
log
(
WARNING
,
"Failed to load "
+
line
,
x
);
}
catch
(
IllegalAccessException
x
)
{
}
catch
(
ClassNotFoundException
|
IllegalAccessException
|
InstantiationException
x
)
{
LOGGER
.
log
(
WARNING
,
"Failed to load "
+
line
,
x
);
}
}
...
...
core/src/main/java/hudson/util/XStream2.java
浏览文件 @
345b9649
...
...
@@ -445,11 +445,7 @@ public class XStream2 extends XStream {
IllegalAccessError
x
=
new
IllegalAccessError
();
x
.
initCause
(
e
);
throw
x
;
}
catch
(
InstantiationException
e
)
{
InstantiationError
x
=
new
InstantiationError
();
x
.
initCause
(
e
);
throw
x
;
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
InstantiationException
|
InvocationTargetException
e
)
{
InstantiationError
x
=
new
InstantiationError
();
x
.
initCause
(
e
);
throw
x
;
...
...
core/src/main/java/hudson/util/xstream/ImmutableListConverter.java
浏览文件 @
345b9649
...
...
@@ -80,12 +80,10 @@ public class ImmutableListConverter extends CollectionConverter {
items
.
add
(
item
);
}
catch
(
CriticalXStreamException
e
)
{
throw
e
;
}
catch
(
XStreamException
e
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
e
);
}
catch
(
LinkageError
e
)
{
}
catch
(
XStreamException
|
LinkageError
e
)
{
RobustReflectionConverter
.
addErrorInContext
(
context
,
e
);
}
reader
.
moveUp
();
reader
.
moveUp
();
}
// move back up past the elements element.
...
...
core/src/main/java/hudson/widgets/RenderOnDemandClosure.java
浏览文件 @
345b9649
...
...
@@ -106,9 +106,7 @@ public class RenderOnDemandClosure {
}
try
{
AdjunctsInPage
.
get
().
assumeIncluded
(
adjuncts
);
}
catch
(
IOException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to resurrect adjunct context"
,
e
);
}
catch
(
SAXException
e
)
{
}
catch
(
IOException
|
SAXException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to resurrect adjunct context"
,
e
);
}
return
context
;
...
...
core/src/main/java/jenkins/PluginSubtypeMarker.java
浏览文件 @
345b9649
...
...
@@ -91,13 +91,10 @@ public class PluginSubtypeMarker extends AbstractProcessor {
}
return
false
;
}
catch
(
RuntimeException
e
)
{
}
catch
(
RuntimeException
|
Error
e
)
{
// javac sucks at reporting errors in annotation processors
e
.
printStackTrace
();
throw
e
;
}
catch
(
Error
e
)
{
e
.
printStackTrace
();
throw
e
;
}
}
...
...
core/src/main/java/jenkins/model/Jenkins.java
浏览文件 @
345b9649
...
...
@@ -3403,9 +3403,6 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
LOGGER
.
log
(
lv
,
s
);
}
});
}
catch
(
InterruptedException
|
ReactorException
|
IOException
e
)
{
LOGGER
.
log
(
SEVERE
,
"Failed to execute termination"
,
e
);
errors
.
add
(
e
);
}
catch
(
OutOfMemoryError
e
)
{
// we should just propagate this, no point trying to log
throw
e
;
...
...
core/src/main/java/jenkins/model/PeepholePermalink.java
浏览文件 @
345b9649
...
...
@@ -148,10 +148,7 @@ public abstract class PeepholePermalink extends Permalink implements Predicate<R
Util
.
createSymlink
(
job
.
getBuildDir
(),
b
.
getId
(),
target
,
TaskListener
.
NULL
);
}
writeSymlink
(
cache
,
target
);
}
catch
(
IOException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to update "
+
job
+
" "
+
getId
()+
" permalink for "
+
b
,
e
);
cache
.
delete
();
}
catch
(
InterruptedException
e
)
{
}
catch
(
IOException
|
InterruptedException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to update "
+
job
+
" "
+
getId
()+
" permalink for "
+
b
,
e
);
cache
.
delete
();
}
...
...
core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java
浏览文件 @
345b9649
...
...
@@ -164,14 +164,10 @@ public abstract class LazyBuildMixIn<JobT extends Job<JobT,RunT> & Queue.Task &
public
RunT
loadBuild
(
File
dir
)
throws
IOException
{
try
{
return
getBuildClass
().
getConstructor
(
asJob
().
getClass
(),
File
.
class
).
newInstance
(
asJob
(),
dir
);
}
catch
(
InstantiationException
e
)
{
throw
new
Error
(
e
);
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
InstantiationException
|
NoSuchMethodException
|
IllegalAccessException
e
)
{
throw
new
Error
(
e
);
}
catch
(
InvocationTargetException
e
)
{
throw
handleInvocationTargetException
(
e
);
}
catch
(
NoSuchMethodException
e
)
{
throw
new
Error
(
e
);
}
}
...
...
core/src/main/java/jenkins/security/ExceptionTranslationFilter.java
浏览文件 @
345b9649
...
...
@@ -118,13 +118,9 @@ public class ExceptionTranslationFilter implements Filter, InitializingBean {
LOGGER
.
finer
(
"Chain processed normally"
);
}
catch
(
AuthenticationException
ex
)
{
catch
(
AuthenticationException
|
AccessDeniedException
ex
)
{
handleException
(
request
,
response
,
chain
,
ex
);
}
catch
(
AccessDeniedException
ex
)
{
handleException
(
request
,
response
,
chain
,
ex
);
}
catch
(
ServletException
ex
)
{
}
catch
(
ServletException
ex
)
{
if
(
ex
.
getRootCause
()
instanceof
AuthenticationException
||
ex
.
getRootCause
()
instanceof
AccessDeniedException
)
{
handleException
(
request
,
response
,
chain
,
(
AcegiSecurityException
)
ex
.
getRootCause
());
...
...
core/src/main/java/jenkins/security/HMACConfidentialKey.java
浏览文件 @
345b9649
...
...
@@ -129,9 +129,7 @@ public class HMACConfidentialKey extends ConfidentialKey {
store
(
encoded
=
key
.
getEncoded
());
}
key
=
new
SecretKeySpec
(
encoded
,
ALGORITHM
);
}
catch
(
IOException
e
)
{
throw
new
Error
(
"Failed to load the key: "
+
getId
(),
e
);
}
catch
(
NoSuchAlgorithmException
e
)
{
}
catch
(
IOException
|
NoSuchAlgorithmException
e
)
{
throw
new
Error
(
"Failed to load the key: "
+
getId
(),
e
);
}
}
...
...
core/src/main/java/jenkins/security/ImpersonatingUserDetailsService.java
浏览文件 @
345b9649
...
...
@@ -28,9 +28,7 @@ public class ImpersonatingUserDetailsService implements UserDetailsService {
public
UserDetails
loadUserByUsername
(
String
username
)
throws
UsernameNotFoundException
,
DataAccessException
{
try
{
return
base
.
loadUserByUsername
(
username
);
}
catch
(
UserMayOrMayNotExistException
e
)
{
return
attemptToImpersonate
(
username
,
e
);
}
catch
(
DataAccessException
e
)
{
}
catch
(
UserMayOrMayNotExistException
|
DataAccessException
e
)
{
return
attemptToImpersonate
(
username
,
e
);
}
}
...
...
core/src/main/java/jenkins/security/RSAConfidentialKey.java
浏览文件 @
345b9649
...
...
@@ -90,9 +90,7 @@ public abstract class RSAConfidentialKey extends ConfidentialKey {
}
}
return
priv
;
}
catch
(
IOException
e
)
{
throw
new
Error
(
"Failed to load the key: "
+
getId
(),
e
);
}
catch
(
GeneralSecurityException
e
)
{
}
catch
(
IOException
|
GeneralSecurityException
e
)
{
throw
new
Error
(
"Failed to load the key: "
+
getId
(),
e
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录