错误:s!=null

 

正确:StringUtils.isNotBlank(s);      

 

public static boolean isBlank(CharSequence cs) {
int strLen;
if (cs != null && (strLen = cs.length()) != 0) {
for(int i = 0; i < strLen; ++i) {
if (!Character.isWhitespace(cs.charAt(i))) {
return false;
}
}

return true;
} else {
return true;
}
}
 

 

相关文章:

  • 2021-12-18
  • 2022-12-23
  • 2021-06-18
  • 2021-08-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
猜你喜欢
  • 2022-02-25
  • 2021-08-23
  • 2022-12-23
  • 2022-02-23
  • 2022-12-23
相关资源
相似解决方案