You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/11/26 14:11:57 UTC

DO NOT REPLY [Bug 14848] New: - ConvertUtils is not (thread)safe

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14848>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14848

ConvertUtils is not (thread)safe

           Summary: ConvertUtils is not (thread)safe
           Product: Commons
           Version: 1.5 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: max@eos.dk


ConvertUtils (and LocaleConvertUtils) is accessed and used by e.g. BeanUtils in 
statically way.




This is a problem for multithreaded programs where one might need a special 
conversion for Date's objects e.g. "ddmmyy" in one case/thread and "yymmdd" in 
another thread. One cannot create an ConvertUtils instance with a specific set 
of Converters and thus ensure that no other thread/application overrules ones 
conversion strategy.




My suggestion is to be able to instantiate an ConvertUtils and have beanutils 
methods that uses an ConverUtils so it can be configured safely.




The current behavior could still be supported by having a static set of methods 
that access a default singleton instance.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>