Now there are different ways to check for this, the old and long java version:
if(params.get("myField") == null){
throw new RuntimeException("please provide the\"myField\" argument");
}
now the assert statement makes this a lot easier to read and saves code
assert params.myField != null. "please provide the \"myFiled\" argument"
now isn't this simpler?
This comment has been removed by a blog administrator.
ReplyDelete