I am trying to check is string empty or not
Simply I have used apache.lang.StringUtils isNotBlank
method to check
String str = " ";
System.out.println(StringUtils.isNotBlank(str)); // Output == true
System.out.println(StringUtils.isNotBlank(str.trim())); // Output == true
// But both expected as false
But every time its printing true
.
Some other string its working fine but for above str value above code not working as expected.