Consider this line:
if (object.getAttribute(\"someAttr\").equals(\"true\")) { // ....
Obviously this line is a potential bug, the attribute
Always aspire for shorter code, given that both are functionaly equivalent. Especially in case like this where readability is not sacrificed.