Author: kkolinko
Date: Wed Jul 9 11:15:15 2014
New Revision: 1609103
URL: http://svn.apache.org/r1609103
Log:
Simplify. No functional change.
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java?rev=1609103&r1=1609102&r2=1609103&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
Wed Jul 9 11:15:15 2014
@@ -175,7 +175,7 @@ public class MapperListener extends Life
if ("/".equals(contextPath)) {
contextPath = "";
}
- String version = ((Context)
wrapper.getParent()).getWebappVersion();
+ String version = context.getWebappVersion();
String hostName = context.getParent().getName();
String wrapperName = wrapper.getName();
String mapping = (String) event.getData();
@@ -187,12 +187,13 @@ public class MapperListener extends Life
// Handle dynamically removing wrappers
Wrapper wrapper = (Wrapper) event.getSource();
- String contextPath = ((Context) wrapper.getParent()).getPath();
+ Context context = (Context) wrapper.getParent();
+ String contextPath = context.getPath();
if ("/".equals(contextPath)) {
contextPath = "";
}
- String version = ((Context)
wrapper.getParent()).getWebappVersion();
- String hostName = wrapper.getParent().getParent().getName();
+ String version = context.getWebappVersion();
+ String hostName = context.getParent().getName();
String mapping = (String) event.getData();
@@ -323,14 +324,15 @@ public class MapperListener extends Life
*/
private void unregisterWrapper(Wrapper wrapper) {
- String contextPath = ((Context) wrapper.getParent()).getPath();
+ Context context = (Context) wrapper.getParent();
+ String contextPath = context.getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
- String version = ((Context) wrapper.getParent()).getWebappVersion();
- String hostName = wrapper.getParent().getParent().getName();
+ String version = context.getWebappVersion();
+ String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]