Skip to content

Instantly share code, notes, and snippets.

@maggandalf
Created April 9, 2011 17:50
Show Gist options
  • Save maggandalf/911604 to your computer and use it in GitHub Desktop.
Save maggandalf/911604 to your computer and use it in GitHub Desktop.
Logging Null Parameter
String log = null;
if(foo == null) {
log = "Foo is Empty";
} else {
log = foo.toString();
}
logger.info(log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment