Tidying up to remove warnings (generics, use of deprecated test classes etc).
This commit is contained in:
@@ -3,7 +3,6 @@ package bigbank.web;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.Controller;
|
||||
@@ -13,7 +12,7 @@ import bigbank.BankService;
|
||||
public class ListAccounts implements Controller {
|
||||
|
||||
private BankService bankService;
|
||||
|
||||
|
||||
public ListAccounts(BankService bankService) {
|
||||
Assert.notNull(bankService);
|
||||
this.bankService = bankService;
|
||||
@@ -24,7 +23,7 @@ public class ListAccounts implements Controller {
|
||||
// if (request.getUserPrincipal() == null) {
|
||||
// throw new AuthenticationCredentialsNotFoundException("You must login to view the account list (Spring Security message)"); // only for Spring Security managed authentication
|
||||
// }
|
||||
|
||||
|
||||
// Actual business logic
|
||||
ModelAndView mav = new ModelAndView("listAccounts");
|
||||
mav.addObject("accounts", bankService.findAccounts());
|
||||
|
||||
Reference in New Issue
Block a user