-
Notifications
You must be signed in to change notification settings - Fork 471
Description
Spotbugs was upgraded to 4.9.3.0 in #5623 , but the SharedVariableAtomicityDetector was disabled. This detector was failing on non-volatile variables that were referenced from different methods and non-atomic changes to primitives. Changing all variables to be volatile or Atomic is likely not the correct change here as that might unnecessarily slow things down. For example, Spotbugs is complaining about non-volatile variables in classes that are not thread safe, but it doesn't know that. This was noted in spotbugs issue 3390 and a subsequent PR was merged to ignore classes marked with the annotation javax.annotation.concurrent.NotThreadSafe. I don't think there has been a release with this change in it yet though. Resolving this issue should likely wait until there is a Spotbugs release with this change so that the annotation can be applied to our classes that are not thread safe.