One step check for null value & emptiness of a string

前端 未结 7 1085
一向
一向 2020-12-18 23:51

I have a setter method.

Then when another (say generate) method is run, I need to check the value of my fields. So in the case of String property, I need to know if

7条回答
  •  隐瞒了意图╮
    2020-12-19 00:45

    use org.apache.commons.lang.StringUtils, the method StringUtils.isNotBlank check both nullity and emptiness.

提交回复
热议问题