Menu

#14 Unsafe checking of empty string

open
7
2011-06-14
2011-06-14
No

* Bug: this is not a safe way to check for empty string (Workflow.java). I see a lot of unsafe (e.g. not checking for null) comparisons being made on fields that are nullable in the database. This is really bad form and wasting a lot of my time to debug:

String paramFMT = param.getFileMetaType();
if(!paramFMT.equals("")){

Should be "".equals(paramFMT)

Discussion

MongoDB Logo MongoDB