I see most actions returning empty maps by using either the EMPTY_MAP
constant from the AbstractAction base class or creating their own
unmodifiable map using Collections.

But in AuthAction, the map is returned via:

map = new HashMap();

as does SunRise.createMap()

I'm not a Java expert so I just want to be sure that it's not a memory leak.
I'm sure it gets garbage collected but isn't it cheaper to return a final
static variable (EMPTY_MAP), especially since it happens on every request?

Per


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to