Is StringUtils.EMPTY recommended?

后端 未结 11 1930
情深已故
情深已故 2020-12-08 01:46

Do you use StringUtils.EMPTY instead of \"\"?

I mean either as a return value or if you set a the value of a String variable. I don\'t mean

11条回答
  •  一生所求
    2020-12-08 02:03

    If your class doesn't use anything else from commons then it'd be a pity to have this dependency just for this magic value.

    The designer of the StringUtils makes heavy use of this constant, and it's the right thing to do, but that doesn't mean that you should use it as well.

提交回复
热议问题