79433478

Date: 2025-02-12 14:47:54
Score: 0.5
Natty:
Report link

As I was suggested to use Lazy initialization for the static variable, i did the same and it worked flawlessly, I didn't even had to update testcases. Thanks a lot!

private static BlobServiceClient BLOB_SERVICE_CLIENT;

public static BlobServiceClient getBlobServiceClient() {
    if(BLOB_SERVICE_CLIENT == null){
        BLOB_SERVICE_CLIENT = new BlobServiceClientBuilder()
                .connectionString(CONNECTION_STRING)
                .buildClient();
    }
    return BLOB_SERVICE_CLIENT;
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Whitelisted phrase (-1): it worked
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Abhishek Prakash