You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/11/23 18:41:16 UTC
svn commit: r1816182 -
/tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java
Author: markt
Date: Thu Nov 23 18:41:16 2017
New Revision: 1816182
URL: http://svn.apache.org/viewvc?rev=1816182&view=rev
Log:
Clean-up
Modified:
tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java
Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1816182&r1=1816181&r2=1816182&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java Thu Nov 23 18:41:16 2017
@@ -569,16 +569,15 @@ public abstract class AbstractProtocol<S
@Override
public void init() throws Exception {
- if (getLog().isInfoEnabled())
- getLog().info(sm.getString("abstractProtocolHandler.init",
- getName()));
+ if (getLog().isInfoEnabled()) {
+ getLog().info(sm.getString("abstractProtocolHandler.init", getName()));
+ }
if (oname == null) {
// Component not pre-registered so register it
oname = createObjectName();
if (oname != null) {
- Registry.getRegistry(null, null).registerComponent(this, oname,
- null);
+ Registry.getRegistry(null, null).registerComponent(this, oname, null);
}
}
@@ -587,14 +586,12 @@ public abstract class AbstractProtocol<S
tpOname = new ObjectName(domain + ":type=ThreadPool,name=" + getName());
Registry.getRegistry(null, null).registerComponent(endpoint, tpOname, null);
} catch (Exception e) {
- getLog().error(sm.getString(
- "abstractProtocolHandler.mbeanRegistrationFailed",
+ getLog().error(sm.getString("abstractProtocolHandler.mbeanRegistrationFailed",
tpOname, getName()), e);
}
- rgOname=new ObjectName(domain +
- ":type=GlobalRequestProcessor,name=" + getName());
+ rgOname = new ObjectName(domain + ":type=GlobalRequestProcessor,name=" + getName());
Registry.getRegistry(null, null).registerComponent(
- getHandler().getGlobal(), rgOname, null );
+ getHandler().getGlobal(), rgOname, null);
for (SSLHostConfig sslHostConfig : getEndpoint().findSslHostConfigs()) {
ObjectName sslOname = new ObjectName(domain + ":type=SSLHostConfig,ThreadPool=" +
@@ -622,9 +619,9 @@ public abstract class AbstractProtocol<S
@Override
public void start() throws Exception {
- if (getLog().isInfoEnabled())
- getLog().info(sm.getString("abstractProtocolHandler.start",
- getName()));
+ if (getLog().isInfoEnabled()) {
+ getLog().info(sm.getString("abstractProtocolHandler.start", getName()));
+ }
endpoint.start();
@@ -643,18 +640,19 @@ public abstract class AbstractProtocol<S
@Override
public void pause() throws Exception {
- if(getLog().isInfoEnabled())
- getLog().info(sm.getString("abstractProtocolHandler.pause",
- getName()));
+ if (getLog().isInfoEnabled()) {
+ getLog().info(sm.getString("abstractProtocolHandler.pause", getName()));
+ }
endpoint.pause();
}
+
@Override
public void resume() throws Exception {
- if(getLog().isInfoEnabled())
- getLog().info(sm.getString("abstractProtocolHandler.resume",
- getName()));
+ if(getLog().isInfoEnabled()) {
+ getLog().info(sm.getString("abstractProtocolHandler.resume", getName()));
+ }
endpoint.resume();
}
@@ -662,9 +660,9 @@ public abstract class AbstractProtocol<S
@Override
public void stop() throws Exception {
- if(getLog().isInfoEnabled())
- getLog().info(sm.getString("abstractProtocolHandler.stop",
- getName()));
+ if(getLog().isInfoEnabled()) {
+ getLog().info(sm.getString("abstractProtocolHandler.stop", getName()));
+ }
if (asyncTimeout != null) {
asyncTimeout.stop();
@@ -677,9 +675,9 @@ public abstract class AbstractProtocol<S
@Override
public void destroy() throws Exception {
if(getLog().isInfoEnabled()) {
- getLog().info(sm.getString("abstractProtocolHandler.destroy",
- getName()));
+ getLog().info(sm.getString("abstractProtocolHandler.destroy", getName()));
}
+
try {
endpoint.destroy();
} finally {
@@ -690,10 +688,8 @@ public abstract class AbstractProtocol<S
// Possibly registered with a different MBeanServer
try {
mserver.unregisterMBean(oname);
- } catch (MBeanRegistrationException |
- InstanceNotFoundException e) {
- getLog().info(sm.getString(
- "abstractProtocol.mbeanDeregistrationFailed",
+ } catch (MBeanRegistrationException | InstanceNotFoundException e) {
+ getLog().info(sm.getString("abstractProtocol.mbeanDeregistrationFailed",
oname, mserver));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org