Refactored to use Spring Assert class (thanks IntelliJ :).
This commit is contained in:
@@ -20,6 +20,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.web.bind.RequestUtils;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.Controller;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -50,10 +51,7 @@ public class DeleteController implements Controller, InitializingBean {
|
||||
}
|
||||
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
if (contactManager == null) {
|
||||
throw new IllegalArgumentException(
|
||||
"A ContactManager implementation is required");
|
||||
}
|
||||
Assert.notNull(contactManager, "A ContactManager implementation is required");
|
||||
}
|
||||
|
||||
public ModelAndView handleRequest(HttpServletRequest request,
|
||||
|
||||
Reference in New Issue
Block a user