suppressing some useless log messages and banners in unit tests (#752)
* suppressing some useless log messages and banners in unit tests * some more log suppressed
This commit is contained in:
@ -32,6 +32,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -41,6 +43,7 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
public class MissingFunctionACUsers {
|
||||
|
||||
// this will actually put controllers on the /WebGoat/* path ... the jsp for list_users restricts what can be seen, but the add_user is not controlled carefully
|
||||
@ -84,8 +87,7 @@ public class MissingFunctionACUsers {
|
||||
userService.addUser(newUser.getUsername(),newUser.getPassword(),newUser.getRole());
|
||||
return userService.loadUserByUsername(newUser.getUsername());
|
||||
} catch (Exception ex) {
|
||||
System.out.println("Error creating new User" + ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
log.error("Error creating new User", ex);
|
||||
//TODO: implement error handling ...
|
||||
} finally {
|
||||
// no streams or other resources opened ... nothing to do, right?
|
||||
|
Reference in New Issue
Block a user