S3077 question in SonarQube 7.5

versions : SonarQube 7.5

When I use sonarQube to analyze my code, a rule in sonarQube show “Remove the ‘volatile’ keyword from this field.”
But I want to create a singleton object. My code is like the following:

public class Singleton {
    private static volatile Singleton singleton = null;
    private Singleton(){}
    public static Singleton getSingleton(){
        synchronized (Singleton.class){
            if(singleton == null){
                singleton = new Singleton();
        return singleton;

I think the keyword volatile is necessary. If remove volatile, it may catch an error.

So, I want to know whether this rule is correct.

My java concurrency knowledge being somewhat limited I had to lookup things to figure out why you would need volatile in this context.

This (old) article : https://javarevisited.blogspot.com/2014/05/double-checked-locking-on-singleton-in-java.html describes in details the why of the pattern you shared.
So while the S3077 issue raised might indeed be arguable in this context, bottom line is that this double checking thread safe singleton pattern was already discouraged 5 years ago in favor of others Singleton patterns (using enums).

I would recommend to follow this steps and keep this code smell as what it is : a (rather indirect) code smell : something is not right here.