|
From: Guillaume P. <gpo...@gl...> - 2004-03-05 18:17:36
|
Hello, While answering to the question concerning PropertyEditors in the post "permanantly registering property editor with BeanWrapper?", I looked the the source code of BeanWrapperImpl and noticed something. It sounds like BeanWrapperImpl's class is not thread safe? And I don't mean instance of the class, but rather the class itself. There's a static HashMap defaultEditors that contains PropertyEditors. However, PropertyEditors are not thread safe. That means if there's two threads using two different instances of BeanWrapperImpl at the same time, there's a possiblity they both get a reference on the same PropertyEditor, and that the getValue() of the first one to call setAsText is the value of the second one that called that method. Or am I missing something? Guillaume |