|
From: Guillaume P. <gpo...@gl...> - 2004-03-06 05:18:55
|
I have created a test case to illustrate the problem, and fixed the BeanWrapperImpl code so that it passes my test case. Both are included in the patch attached to this E-Mail. Feel free to use/modify the code. (The number of threads created might need adjustement). Guillaume ----- Original Message ----- From: "Guillaume Poirier" <gpo...@gl...> To: <spr...@li...> Sent: Friday, March 05, 2004 1:02 PM Subject: [Springframework-developer] BeanWrapperImpl & PropertyEditors > 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 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |