Skip to content

Commit

Permalink
[#264] One more helper for notFoundIfNull
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan committed Oct 11, 2010
1 parent eae3d6b commit 4113131
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions framework/src/play/mvc/Controller.java
Expand Up @@ -352,6 +352,17 @@ protected static void notFoundIfNull(Object o) {
}
}

/**
* Send a 404 Not Found response if object is null
* @param o The object to check
* @param what The Not Found resource name
*/
protected static void notFoundIfNull(Object o, String what) {
if (o == null) {
notFound(what);
}
}

/**
* Send a 404 Not Found reponse
*/
Expand Down

0 comments on commit 4113131

Please sign in to comment.