Author: kkolinko Date: Thu Nov 10 06:11:10 2011 New Revision: 1200173 URL: http://svn.apache.org/viewvc?rev=1200173&view=rev Log: Merged revision 1187753 from tomcat/trunk: Clean-up. No functional change. Part 1 of n.
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/ClientAbortException.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Connector.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Constants.java Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/ClientAbortException.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/ClientAbortException.java?rev=1200173&r1=1200172&r2=1200173&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/ClientAbortException.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/ClientAbortException.java Thu Nov 10 06:11:10 2011 @@ -5,17 +5,15 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.connector; import java.io.IOException; @@ -32,7 +30,7 @@ public final class ClientAbortException private static final long serialVersionUID = 1L; - + //------------------------------------------------------------ Constructors /** @@ -119,12 +117,12 @@ public final class ClientAbortException */ @Override public Throwable getCause() { - + return (throwable); - + } - + /** * Return a formatted string that describes this exception. */ Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java?rev=1200173&r1=1200172&r2=1200173&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java Thu Nov 10 06:11:10 2011 @@ -5,17 +5,15 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.connector; import java.io.IOException; @@ -45,7 +43,7 @@ public class CometEventImpl implements C // ----------------------------------------------------- Instance Variables - + /** * Associated request. */ @@ -57,18 +55,18 @@ public class CometEventImpl implements C */ protected Response response = null; - + /** * Event type. */ protected EventType eventType = EventType.BEGIN; - + /** * Event sub type. */ protected EventSubType eventSubType = null; - + // --------------------------------------------------------- Public Methods @@ -83,11 +81,11 @@ public class CometEventImpl implements C public void setEventType(EventType eventType) { this.eventType = eventType; } - + public void setEventSubType(EventSubType eventSubType) { this.eventSubType = eventSubType; } - + @Override public void close() throws IOException { if (request == null) { @@ -125,12 +123,14 @@ public class CometEventImpl implements C UnsupportedOperationException { if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) { request.setAttribute("org.apache.tomcat.comet.timeout", Integer.valueOf(timeout)); - if (request.isComet()) request.setCometTimeout(timeout); + if (request.isComet()) { + request.setCometTimeout(timeout); + } } else { throw new UnsupportedOperationException(); } } - + @Override public String toString() { StringBuilder buf = new StringBuilder(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Connector.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Connector.java?rev=1200173&r1=1200172&r2=1200173&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Connector.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Connector.java Thu Nov 10 06:11:10 2011 @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.connector; import java.util.Arrays; @@ -350,7 +348,7 @@ public class Connector extends Lifecycle } - + /** * Return the default timeout for async requests in ms. */ @@ -373,7 +371,7 @@ public class Connector extends Lifecycle } - + /** * Return the "enable DNS lookups" flag. */ @@ -496,11 +494,13 @@ public class Connector extends Lifecycle HashSet<String> methodSet = new HashSet<String>(); - if( null != methods ) + if( null != methods ) { methodSet.addAll(Arrays.asList(methods.split("\\s*,\\s*"))); + } - if( methodSet.contains("TRACE") ) + if( methodSet.contains("TRACE") ) { throw new IllegalArgumentException(sm.getString("coyoteConnector.parseBodyMethodNoTrace")); + } this.parseBodyMethods = methods; this.parseBodyMethodsSet = methodSet; @@ -555,7 +555,7 @@ public class Connector extends Lifecycle return getProtocolHandlerClassName(); } - + /** * Set the Coyote protocol which will be used by the connector. @@ -875,7 +875,7 @@ public class Connector extends Lifecycle protected String createObjectNameKeyProperties(String type) { - + Object addressObj = getProperty("address"); StringBuilder sb = new StringBuilder("type="); @@ -923,14 +923,15 @@ public class Connector extends Lifecycle protected void initInternal() throws LifecycleException { super.initInternal(); - + // Initialize adapter adapter = new CoyoteAdapter(this); protocolHandler.setAdapter(adapter); // Make sure parseBodyMethodsSet has a default - if( null == parseBodyMethodsSet ) + if( null == parseBodyMethodsSet ) { setParseBodyMethods(getParseBodyMethods()); + } try { protocolHandler.init(); @@ -1003,7 +1004,7 @@ public class Connector extends Lifecycle @Override protected void destroyInternal() throws LifecycleException { mapperListener.destroy(); - + try { protocolHandler.destroy(); } catch (Exception e) { @@ -1015,7 +1016,7 @@ public class Connector extends Lifecycle if (getService() != null) { getService().removeConnector(this); } - + super.destroyInternal(); } Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Constants.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Constants.java?rev=1200173&r1=1200172&r2=1200173&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Constants.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Constants.java Thu Nov 10 06:11:10 2011 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org