I am working in a Java project and my code shows weird behavior. Here is my code:
String access = String.valueOf(getStringvalue());
Boolean isBlank = StringUtils.isBlank(access);
In the above code, 'access' object can have null values.
And it is said that if we pass a null value to StringUtils.isBlank(), it will return true. But here I returned only false value when access is null. What is the reason for this behavior?
StringUtilsclass. It is from apache common utils?nulltoString.valueOfyou get the string"null". That is not null and it is not blank.