https://issues.apache.org/bugzilla/show_bug.cgi?id=52830

--- Comment #6 from Konstantin Kolinko <knst.koli...@gmail.com> 2012-03-21 
00:47:51 UTC ---
Regarding the patch - r1298635 - I see one minor (theoretical?) issue.

It calls
Name result = new CompositeName();
..
result.addAll(name.getSuffix(1));


Looking at CompositeName#addAll(Name) in Java 6u31 I see that it expects that
(Name instanceof CompositeName) and throws InvalidNameException if it is not.
With a generic Name.getSuffix(int) that is not true.

Though I do not see how other name implementations could be used here.

Here is alternative implementation of the fix:
TestNamingContext passes with it as well.
[[[
                Name result = name.getSuffix(1);
                result.add(0, name.get(0).substring(prefixLength));
                return result;
]]]

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

Reply via email to