False waring about Spring bean afterPropertiesSet method


(sicheng) #1

The sonarqube keeps giving me this message
Correctness - Method of Singleton class writes to a field in an unsynchronized manner on the Spring bean afterPropertiesSet method.
As I understood, this method will be called only once during the Spring bean’s lifecycle, just wanna know when sonarqube produces this message is it aware of the code actually runs under Spring framework?

Best regards

(G Ann Campbell) #2


The format of the message

indicates that this issue is from the FindBugs/SpotBugs plugin. You might want to ask there.