autotune icon indicating copy to clipboard operation
autotune copied to clipboard

Proceed to check "isEmpty" only if the string is "not null"

Open bharathappali opened this issue 1 year ago • 1 comments

We should be setting the authorization header if the authHeaderString is not null and not empty. The earlier check used an or case where the program proceeds to check if it's not empty even though the string is null as the OR gate checks both the conditions to decide the outcome, Now we replace it with a logical and case where we proceed only if the first case (not null) case is true.

This fix avoids the null pointer exception raised when we call isEmpty() over a null

Signed-off-by: bharathappali [email protected]

bharathappali avatar Aug 25 '22 08:08 bharathappali

@dinogun Just made a trivial change of placing null as left (first) operand as a better practice, Can I please have your review on it? Thanks in advance.

bharathappali avatar Aug 25 '22 08:08 bharathappali