Polish
This commit is contained in:
@@ -116,7 +116,7 @@ public abstract class AnsiOutput {
|
||||
}
|
||||
return !(OPERATING_SYSTEM_NAME.indexOf("win") >= 0);
|
||||
}
|
||||
catch (Throwable e) {
|
||||
catch (Throwable ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class PropertySourcesPropertyValues implements PropertyValues {
|
||||
try {
|
||||
value = resolver.getProperty(propertyName);
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
catch (RuntimeException ex) {
|
||||
// Probably could not resolve placeholders, ignore it here
|
||||
}
|
||||
this.propertyValues.put(propertyName, new PropertyValue(
|
||||
|
||||
@@ -121,9 +121,9 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
|
||||
try {
|
||||
super.refresh();
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
catch (RuntimeException ex) {
|
||||
stopAndReleaseEmbeddedServletContainer();
|
||||
throw e;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,11 +340,11 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
|
||||
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex);
|
||||
throw ex;
|
||||
}
|
||||
catch (Error err) {
|
||||
logger.error("Context initialization failed", err);
|
||||
catch (Error ex) {
|
||||
logger.error("Context initialization failed", ex);
|
||||
servletContext.setAttribute(
|
||||
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, err);
|
||||
throw err;
|
||||
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex);
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ public class TomcatEmbeddedServletContainer implements EmbeddedServletContainer
|
||||
Connector connector = this.tomcat.getConnector();
|
||||
connector.getProtocolHandler().stop();
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("Cannot pause connector: ", e);
|
||||
catch (Exception ex) {
|
||||
this.logger.error("Cannot pause connector: ", ex);
|
||||
}
|
||||
// Unlike Jetty, all Tomcat threads are daemon threads. We create a
|
||||
// blocking non-daemon to stop immediate shutdown
|
||||
@@ -105,8 +105,8 @@ public class TomcatEmbeddedServletContainer implements EmbeddedServletContainer
|
||||
try {
|
||||
connector.getProtocolHandler().start();
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("Cannot start connector: ", e);
|
||||
catch (Exception ex) {
|
||||
this.logger.error("Cannot start connector: ", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -454,9 +454,9 @@ public class TomcatEmbeddedServletContainerFactory extends
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
catch (ClassNotFoundException ex) {
|
||||
}
|
||||
catch (LinkageError e) {
|
||||
catch (LinkageError ex) {
|
||||
}
|
||||
return nativePage;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class TomcatEmbeddedWebappClassLoader extends WebappClassLoader {
|
||||
try {
|
||||
return Class.forName(name, false, this.parent);
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
catch (ClassNotFoundException ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class TomcatEmbeddedWebappClassLoader extends WebappClassLoader {
|
||||
try {
|
||||
return findClass(name);
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
catch (ClassNotFoundException ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -105,9 +105,9 @@ public class TomcatEmbeddedWebappClassLoader extends WebappClassLoader {
|
||||
this.securityManager.checkPackageAccess(name.substring(0,
|
||||
name.lastIndexOf('.')));
|
||||
}
|
||||
catch (SecurityException se) {
|
||||
catch (SecurityException ex) {
|
||||
throw new ClassNotFoundException("Security Violation, attempt to use "
|
||||
+ "Restricted Class: " + name, se);
|
||||
+ "Restricted Class: " + name, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,8 +160,8 @@ public class VcapApplicationContextInitializer implements
|
||||
properties.putAll(map);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error("Could not parse VCAP_APPLICATION", e);
|
||||
catch (Exception ex) {
|
||||
logger.error("Could not parse VCAP_APPLICATION", ex);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
@@ -187,8 +187,8 @@ public class VcapApplicationContextInitializer implements
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error("Could not parse VCAP_APPLICATION", e);
|
||||
catch (Exception ex) {
|
||||
logger.error("Could not parse VCAP_APPLICATION", ex);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class SimpleFormatter extends Formatter {
|
||||
try {
|
||||
value = System.getenv(key);
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (Exception ex) {
|
||||
// ignore
|
||||
}
|
||||
if (value == null) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class OutputCapture implements TestRule {
|
||||
this.captureOut.flush();
|
||||
this.captureErr.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (IOException ex) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public class OutputCapture implements TestRule {
|
||||
Class.forName("org.springframework.boot.ansi.AnsiOutput");
|
||||
return new AnsiPresentOutputControl();
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
catch (ClassNotFoundException ex) {
|
||||
return new AnsiOutputControl();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user