Closed alvegh closed 1 year ago
Hey,
Just wanted to give a little headsup - the subject says it.
I am using the SwicoS1Decoder to parse the contents of a QR Code , and in heavy server use this proved out to be flaky
The reason is the SWICO_NUMBER_FORMAT global static
java.text.DecimalFormat is famously not threadsafe
My solution is to declare that static as a ThreadLocal which fixes at least my usecase.
I am not using the SwicoS1Encoder, but it looks like it has the same problem
Regards Alex
Thank you for reporting this. I wasn't aware of this DecimalFormat issue.
This issue has been fixed in version 3.0.7.
Hey,
Just wanted to give a little headsup - the subject says it.
I am using the SwicoS1Decoder to parse the contents of a QR Code , and in heavy server use this proved out to be flaky
The reason is the SWICO_NUMBER_FORMAT global static
java.text.DecimalFormat is famously not threadsafe
My solution is to declare that static as a ThreadLocal which fixes at least my usecase.
I am not using the SwicoS1Encoder, but it looks like it has the same problem
Regards Alex