False waring about Spring bean afterPropertiesSet method

java

(sicheng) #1

Hi:
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

Hi,

The format of the message

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

Ann