Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: find method process empty string "" as null

 
mohamed sulibi
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all;

my find method implementation process empty string "" as null so it return any value. so is it must to check if the column value is "" or not. and it is usal way ???


Best regards.
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My method did the same thing. I think it is ok as long as you document it. When do the find method and provide "" logically it is valid for all record because in my assignment, it says "Fred" match with "Fred" and "Freddy". So the empty String "" match with everything. Please consider the other suggestions.

good luck

Jeffry Kristianto Yanuar
Java Instructor
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2) --> testing and documenting the assignment
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic