MYFACES-4766: BeanPropertyTagRule: stop caching arguments and use volatile to prevent concurrency errors - #1084
cocorossello wants to merge 6 commits into
Conversation
|
Why not just make the old field Lazy<>? |
It's an option, but isn't this more complicated? |
|
Volatile/synchronized should not be required If you use it correctly. Lazy has a method arg, to resolve the value once |
|
Changed, but note that if getValue is not synchronized it may be initialized in more than 1 thread (it may be acceptable or better than synchronized anyway, I can remove it if you prefer) |
… we want to prevent this to be possible initialized in more than one thread (which it may be acceptable)
|
Lazy internally is synchronized |
|
Also we should avoid to instantiate the new array all the time |
… each time. FaceletContext must be resolved, otherwise I would need to change Lazy class to pass the supplier as an argument
|
Looks good for me, thanks |
|
@melloware build hangs, can you take over? |
|
Tested in my environment, no more cases, I applied last change today. To be absolutely sure it should be running a few days, because it only happened once or twice per day. |
No description provided.