Who's the Dummy, here, exactly?
-
Just found this in a piece of code I am tasked with migrating:
// TODO remove code smell private static final String DUMMY = "393hlaf02lhasfh329";
What is it used for, you ask? Well I did, too. Here it is:
public Boolean readParse(String key, Boolean defaultValue) { String retVal = ResReader.read(key, DUMMY); if (DUMMY.equals(retVal)) { return defaultValue; } else { return Boolean.valueOf(retVal); } }
Ugh. It's gonna be a long day...
-
Just change it to DUMMY = "whatever" and you're done.
-
@flabdablet said:
Just change it to DUMMY = "whatever" and you're done.
DUMMY = "You Big Dummy"
-
DUMMY = defaultValue.toString();
boom.
-
-
> svn blame dummyFile
Stupid variable checked in by PaolaBeanDUMMY = "PaolaBean"
May have gotten the details slightly wrong, but you get the idea.
-
I specially like how it returns false if
retVal == "393hlaF02lhasfh329"
or other such values.