Consider this line:
if (object.getAttribute(\"someAttr\").equals(\"true\")) { // ....
Obviously this line is a potential bug, the attribute
Util.isEmpty(string)
- returns string == null || string.trim().isEmpty()
Util.notNull(string)
returns "" if string == null
, string otherwise.
Util.isNotEmpty(string)
returns ! Util.isEmpty(string)
And we have a convention that for strings, Util.isEmpty(string)
semantically means true and Util.isNotEmpty(string)
semantically means false.