You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2012/03/23 17:38:43 UTC

svn commit: r1304468 - /tomcat/trunk/java/org/apache/naming/SelectorContext.java

Author: kkolinko
Date: Fri Mar 23 16:38:43 2012
New Revision: 1304468

URL: http://svn.apache.org/viewvc?rev=1304468&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=52830#c6
Alternative implementation of the fix,
which does not require that name were an instance of CompositeName.

(I am not sure that this change is worth it, but I think it is better this way).

Modified:
    tomcat/trunk/java/org/apache/naming/SelectorContext.java

Modified: tomcat/trunk/java/org/apache/naming/SelectorContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/SelectorContext.java?rev=1304468&r1=1304467&r2=1304468&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/SelectorContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/SelectorContext.java Fri Mar 23 16:38:43 2012
@@ -21,7 +21,6 @@ package org.apache.naming;
 import java.util.Hashtable;
 
 import javax.naming.Binding;
-import javax.naming.CompositeName;
 import javax.naming.Context;
 import javax.naming.Name;
 import javax.naming.NameClassPair;
@@ -773,9 +772,8 @@ public class SelectorContext implements 
             if (name.get(0).equals(prefix)) {
                 return name.getSuffix(1);
             } else {
-                Name result = new CompositeName();
-                result.add(name.get(0).substring(prefixLength));
-                result.addAll(name.getSuffix(1));
+                Name result = name.getSuffix(1);
+                result.add(0, name.get(0).substring(prefixLength));
                 return result;
             }
         } else {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org