Author: markt
Date: Thu Nov 19 10:32:05 2015
New Revision: 1715148
URL: http://svn.apache.org/viewvc?rev=1715148&view=rev
Log:
Refactor to simplify code and reduce opportunity for error
Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardService.java
tomcat/trunk/java/org/apache/catalina/mapper/MapperListener.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/catalina/core/StandardService.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardService.java?rev=1715148&r1=1715147&r2=1715148&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardService.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardService.java Thu Nov 19
10:32:05 2015
@@ -105,8 +105,7 @@ public class StandardService extends Lif
/**
* Mapper listener.
*/
- protected final MapperListener mapperListener =
- new MapperListener(mapper, this);
+ protected final MapperListener mapperListener = new MapperListener(this);
// ------------------------------------------------------------- Properties
Modified: tomcat/trunk/java/org/apache/catalina/mapper/MapperListener.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mapper/MapperListener.java?rev=1715148&r1=1715147&r2=1715148&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/mapper/MapperListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mapper/MapperListener.java Thu Nov 19
10:32:05 2015
@@ -81,12 +81,11 @@ public class MapperListener extends Life
/**
* Create mapper listener.
*
- * @param mapper The mapper instance this listener will update
* @param service The service this listener is associated with
*/
- public MapperListener(Mapper mapper, Service service) {
- this.mapper = mapper;
+ public MapperListener(Service service) {
this.service = service;
+ this.mapper = service.getMapper();
}
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1715148&r1=1715147&r2=1715148&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Nov 19 10:32:05 2015
@@ -44,6 +44,17 @@
They eventually become mixed with the numbered issues. (I.e., numbered
issues do not "pop up" wrt. others).
-->
+<section name="Tomcat 9.0.0.M2">
+ <subsection name="Catalina">
+ <changelog>
+ <scode>
+ Refactor creation of <code>MapperListener</code> to ensure that the
+ <code>Mapper</code> used is the <code>Mapper</code> associated with the
+ <code>Service</code> for which the listener was created. (markt)
+ </scode>
+ </changelog>
+ </subsection>
+</section>
<section name="Tomcat 9.0.0.M1" rtext="2015-11-17">
<subsection name="General">
<changelog>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]