!null和!StringUtils.isEmpty的区别

如果希望判断某个字符串属性是否为空,要用后者,因为空字符串满足!null 但不满足StringUtils.isEmpty

if ( !StringUti1s. isEmpty(sa1esReturnConnectionCriteria . getConsigneeName 
lambda . eq (SalesReturnConnection : : getConsigneeName , salesReturnConnectionCriteria . getConsigneeName ( ) ) 
private String consigneeName; 
if ( 
Ittd#consIgneeNameäk2! null StringlJtiIs_isEmpty 
null 
tAddress() ! —null)

posted @ 2021-10-05 00:06  夏·舍  阅读(98)  评论(0编辑  收藏  举报