Don't use single letter catch variables
Update existing catch blocks to ensure that `ex` is always used in preference to `e` or `t` as the variable name. Issue: SPR-16968
This commit is contained in:
parent
8f9aa06dfe
commit
0ad0f341bd
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
|
|
@ -54,12 +54,12 @@ class CacheRemoveEntryInterceptor extends AbstractKeyCacheInterceptor<CacheRemov
|
|||
}
|
||||
return result;
|
||||
}
|
||||
catch (CacheOperationInvoker.ThrowableWrapper t) {
|
||||
Throwable ex = t.getOriginal();
|
||||
catch (CacheOperationInvoker.ThrowableWrapper wrapperException) {
|
||||
Throwable ex = wrapperException.getOriginal();
|
||||
if (!earlyRemove && operation.getExceptionTypeFilter().match(ex.getClass())) {
|
||||
removeValue(context);
|
||||
}
|
||||
throw t;
|
||||
throw wrapperException;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -403,8 +403,8 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport
|
|||
try {
|
||||
return this.delegate.call();
|
||||
}
|
||||
catch (Throwable t) {
|
||||
this.errorHandler.handleError(t);
|
||||
catch (Throwable ex) {
|
||||
this.errorHandler.handleError(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class DefaultMvcResult implements MvcResult {
|
|||
try {
|
||||
return this.asyncDispatchLatch.await(timeout, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
catch (InterruptedException ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
|
|
@ -99,8 +99,8 @@ class CallableInterceptorChain {
|
|||
return result;
|
||||
}
|
||||
}
|
||||
catch (Throwable t) {
|
||||
return t;
|
||||
catch (Throwable ex) {
|
||||
return ex;
|
||||
}
|
||||
}
|
||||
return CallableProcessingInterceptor.RESULT_NONE;
|
||||
|
|
@ -130,8 +130,8 @@ class CallableInterceptorChain {
|
|||
return result;
|
||||
}
|
||||
}
|
||||
catch (Throwable t) {
|
||||
return t;
|
||||
catch (Throwable ex) {
|
||||
return ex;
|
||||
}
|
||||
}
|
||||
return CallableProcessingInterceptor.RESULT_NONE;
|
||||
|
|
|
|||
|
|
@ -250,8 +250,8 @@ public abstract class RouterFunctions {
|
|||
try {
|
||||
return supplier.get();
|
||||
}
|
||||
catch (Throwable t) {
|
||||
return Mono.error(t);
|
||||
catch (Throwable ex) {
|
||||
return Mono.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
|
|
@ -101,8 +101,8 @@ public class StandardWebSocketSession extends AbstractListenerWebSocketSession<S
|
|||
CloseReason.CloseCode code = CloseCodes.getCloseCode(status.getCode());
|
||||
getDelegate().close(new CloseReason(code, status.getReason()));
|
||||
}
|
||||
catch (IOException e) {
|
||||
return Mono.error(e);
|
||||
catch (IOException ex) {
|
||||
return Mono.error(ex);
|
||||
}
|
||||
return Mono.empty();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue