Remove superfluous quotes from thread names for
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 13 Jun 2011 11:19:23 +0000 (11:19 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 13 Jun 2011 11:19:23 +0000 (11:19 +0000)
connection pools.

Example broken thread name: "http-apr-8001"-exec-2
(including leading and intermediate quotes).

Since we never use the names as a full ObjectName,
only as a part of an ObjectName, it is safe to
remove the surrounding quotes from the Protocol name.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1135088 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/AbstractProtocol.java
webapps/docs/changelog.xml

index e6a6f42..8cbc31c 100644 (file)
@@ -229,7 +229,8 @@ public abstract class AbstractProtocol implements ProtocolHandler,
             name.append('-');
         }
         name.append(endpoint.getPort());
-        return ObjectName.quote(name.toString());
+        String quotedName = ObjectName.quote(name.toString());
+        return quotedName.substring(1, quotedName.length()-1);
     }
 
     
index e98e9dc..d598de5 100644 (file)
         Fix unit test for bindOnInit which was failing for APR on some
         platforms. (rjung)
       </fix>
+      <fix>
+        Remove superfluous quotes from thread names for connection pools.
+        (rjung)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">