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

--- Comment #7 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(In reply to Violeta Georgieva from comment #6)
> (In reply to Konstantin Kolinko from comment #4)
> 
> > UEncoder is used in list(). While it is possible to call list() multiple
> > times, I think that in practice it is called only once.
> 
> list() is called many times by
> org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(URL,
> WebXml, boolean)
> 
> As we add a save char to UEncoder I do not think that it will be OK to do
> this every time when list() is called.
> 
> Wdyt?

As far as I see, it opens a new DirContextURLConnection each time. While the
method is called many times, a connection is not reused. Thus a class-level
field provides no benefit.

It should be possible to initialize UEncoder.safeChars bitset once and share
the same bitset between UEncoders.  It will save us some time and memory.

A single UEncoder.addSafeCharacter() call does not matter much, but
UEncoder().initSafeChars() that adds around 60 characters does matter.

-- 
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