code: public static SecureRandom getSecureRandom() {
          // we use double checked locking to minimize synchronization
          // works because we use a volatile reference
          SecureRandom r = secureRandom;
          if (r == null) {
              synchronized (LOCK) {
                  r = secureRandom;
                  if (r == null) {
                      r = new SecureRandom();
                      secureRandom = r;
                  }
              }
          }
          return r;
      }
docs: Get a SecureRandom instance. This method should me used by JDK
  internal code in favor of calling "new SecureRandom()". That needs to
  iterate through the provider table to find the default SecureRandom
  implementation, which is fairly inefficient.