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:
René Zubcevic
2020-01-25 12:11:45 +01:00
committed by GitHub
parent edd6b7d7cf
commit 4e371b63d0
30 changed files with 44 additions and 68 deletions

View File

@ -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?