On 23/06/2021 10:37, Rémy Maucherat wrote:
On Wed, Jun 23, 2021 at 11:18 AM Mark Thomas <ma...@apache.org> wrote:

<snip/>

I have a fix in mind for the toString()/toXml() methods. It may have a
marginal performance impact but given that these methods are only used
when debugging and/or persisting configuration to disk I don't think
that is a concern.

Ooops. Looking at the code, syncing for isInRole seemed really bad to
me.

Agreed it was bad.

Kinda demonstrated this is not meant for production.

Yep.

Here, since it's "ok" to have an empty groups list, I would just skip
the check which would result in groups="" and roles="".

That is a simpler solution that the one I was working on. I'll redo things to use your solution.

If the empty lists is an issue in the future we can always go back to my more complex solution (get the Iterator, check hasNext() and then call a new StringUtils.join() that takes an Iterator).

Mark

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

Reply via email to