intuit / QuickBooks-V3-Java-SDK

Java SDK for QuickBooks REST API v3 services
Apache License 2.0
70 stars 144 forks source link

GenerateQuery is not suitable for multi-threaded environments #223

Open yurii-shylov opened 2 months ago

yurii-shylov commented 2 months ago

GenerateQuery saves QueryMessage in a static variable inside. If multiple threads are generating queries at the same time, parts of those queries get mixed up and eventually fail to execute. I think either message should be wrapped into ThreadLocal, or GenerateQuery should create and return a wrapper object containing the message