Created
September 16, 2011 10:11
-
-
Save chids/1221742 to your computer and use it in GitHub Desktop.
How not to write null checking/masking logic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(leftImage != null) | |
{ | |
leftImage = leftImage.toLowerCase(); | |
} | |
if(leftImage.equals("null")) | |
{ | |
leftImage = null; | |
} | |
// ... repeated for 5 different string variables |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Glorius!