Josep García
2011-12-14 09:45:50 UTC
I have been debugging some code lately and I don't see the need for the
method:
/**
* Grab the entity from the database before populating with request
parameters
*/
public void prepare() {
// prevent failures on new
if (getRequest().getMethod().equalsIgnoreCase("post") &&
(!"".equals(getRequest().getParameter("user.id")))) {
user = userManager.getUser(getRequest().getParameter("user.id
"));
}
}
If I comment out the implementation, everything works fine and all the
tests pass.
Cheers,
Josep
method:
/**
* Grab the entity from the database before populating with request
parameters
*/
public void prepare() {
// prevent failures on new
if (getRequest().getMethod().equalsIgnoreCase("post") &&
(!"".equals(getRequest().getParameter("user.id")))) {
user = userManager.getUser(getRequest().getParameter("user.id
"));
}
}
If I comment out the implementation, everything works fine and all the
tests pass.
Cheers,
Josep