commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <>
Subject [jira] Commented: (LANG-436) Remove caching from MethodUtils
Date Fri, 13 Jun 2008 14:26:46 GMT


Niall Pemberton commented on LANG-436:

Whoever implemented MethodUtils's caching in BeanUtils presumably did so to improve performance
and therefore removing it could negatively affect existing applications - for example Struts1
users. The copy of MethodUtils here in lang has only recently been added - its not in a released
version and therefore has no existing users to be concerned about. Better then IMO to just
provide the reflection functionality here without the caching which is much cleaner.

I have done some work on the memory leak associated with the WeakHashMap (nothing to do with
the lack of synchronization - which I agree is another issue, thanks for reporting it) and
problem seems to be caused by the Method reference held in the MethodDescriptor - see BEANUTILS-291
and which seems to fix this.

The BEANUTILS-291 memory leak issues is still on my todo list - but its currently in a broken
state - with the same kind of issue as BEANUTILS-318, caused by me replacing the FastHashMap
with WeakHashMap. I need to find time to finish up so that we can get a BeanUtils release
out with these issues resolved.

> Remove caching from MethodUtils
> -------------------------------
>                 Key: LANG-436
>                 URL:
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Niall Pemberton
>            Assignee: Niall Pemberton
>             Fix For: 3.0
>         Attachments: LANG-436-remove-MethodUtils-caching.patch
> I think we should remove the caching from MethodUtils. This has caused memory leak problems
in BeanUtils (where it was copied from) and better IMO to just provide the pure reflection
API in lang and let downstream users provide solutions for improving performance.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message