SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.8.5

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
67 73 0 0

com.codecool.bytebattlers.config.SecurityConfiguration

Bug Category Details Line Priority
new com.codecool.bytebattlers.config.SecurityConfiguration(JwtAuthenticationFilter, AuthenticationProvider) may expose internal representation by storing an externally mutable object into SecurityConfiguration.jwtAuthFilter MALICIOUS_CODE EI_EXPOSE_REP2 16 Medium

com.codecool.bytebattlers.controller.BoardGameController

Bug Category Details Line Priority
new com.codecool.bytebattlers.controller.BoardGameController(BoardGameService, BoardGameMapper) may expose internal representation by storing an externally mutable object into BoardGameController.boardGameService MALICIOUS_CODE EI_EXPOSE_REP2 30 Medium
Null passed for non-null parameter of new org.springframework.http.ResponseEntity(MultiValueMap, HttpStatusCode) in com.codecool.bytebattlers.controller.BoardGameController.addNewBoardGame(BoardGameDto) CORRECTNESS NP_NONNULL_PARAM_VIOLATION 66 High

com.codecool.bytebattlers.controller.CategoryController

Bug Category Details Line Priority
new com.codecool.bytebattlers.controller.CategoryController(CategoryService) may expose internal representation by storing an externally mutable object into CategoryController.categoryService MALICIOUS_CODE EI_EXPOSE_REP2 23 Medium

com.codecool.bytebattlers.controller.PublisherController

Bug Category Details Line Priority
new com.codecool.bytebattlers.controller.PublisherController(PublisherService) may expose internal representation by storing an externally mutable object into PublisherController.service MALICIOUS_CODE EI_EXPOSE_REP2 22 Medium

com.codecool.bytebattlers.controller.RatingController

Bug Category Details Line Priority
new com.codecool.bytebattlers.controller.RatingController(RatingService, RatingMapper) may expose internal representation by storing an externally mutable object into RatingController.ratingService MALICIOUS_CODE EI_EXPOSE_REP2 24 Medium

com.codecool.bytebattlers.controller.ReviewController

Bug Category Details Line Priority
new com.codecool.bytebattlers.controller.ReviewController(ReviewService) may expose internal representation by storing an externally mutable object into ReviewController.reviewService MALICIOUS_CODE EI_EXPOSE_REP2 23 Medium

com.codecool.bytebattlers.controller.UserController

Bug Category Details Line Priority
new com.codecool.bytebattlers.controller.UserController(UserService) may expose internal representation by storing an externally mutable object into UserController.userService MALICIOUS_CODE EI_EXPOSE_REP2 21 Medium
Null passed for non-null parameter of new org.springframework.http.ResponseEntity(MultiValueMap, HttpStatusCode) in com.codecool.bytebattlers.controller.UserController.registerNewUser(AppUserDto) CORRECTNESS NP_NONNULL_PARAM_VIOLATION 82 High

com.codecool.bytebattlers.controller.dto.AppUserDto

Bug Category Details Line Priority
com.codecool.bytebattlers.controller.dto.AppUserDto.favoriteBoardGamePublicIDS() may expose internal representation by returning AppUserDto.favoriteBoardGamePublicIDS MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
com.codecool.bytebattlers.controller.dto.AppUserDto.reviews() may expose internal representation by returning AppUserDto.reviews MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
new com.codecool.bytebattlers.controller.dto.AppUserDto(UUID, String, String, String, Set, Set) may expose internal representation by storing an externally mutable object into AppUserDto.favoriteBoardGamePublicIDS MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium
new com.codecool.bytebattlers.controller.dto.AppUserDto(UUID, String, String, String, Set, Set) may expose internal representation by storing an externally mutable object into AppUserDto.reviews MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium

com.codecool.bytebattlers.controller.dto.BoardGameDto

Bug Category Details Line Priority
com.codecool.bytebattlers.controller.dto.BoardGameDto.appUserPublicIDS() may expose internal representation by returning BoardGameDto.appUserPublicIDS MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
com.codecool.bytebattlers.controller.dto.BoardGameDto.categories() may expose internal representation by returning BoardGameDto.categories MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
com.codecool.bytebattlers.controller.dto.BoardGameDto.ratings() may expose internal representation by returning BoardGameDto.ratings MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
com.codecool.bytebattlers.controller.dto.BoardGameDto.reviews() may expose internal representation by returning BoardGameDto.reviews MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
new com.codecool.bytebattlers.controller.dto.BoardGameDto(UUID, String, int, int, int, Set, int, String, UUID, String, Set, Set, Set) may expose internal representation by storing an externally mutable object into BoardGameDto.appUserPublicIDS MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium
new com.codecool.bytebattlers.controller.dto.BoardGameDto(UUID, String, int, int, int, Set, int, String, UUID, String, Set, Set, Set) may expose internal representation by storing an externally mutable object into BoardGameDto.categories MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium
new com.codecool.bytebattlers.controller.dto.BoardGameDto(UUID, String, int, int, int, Set, int, String, UUID, String, Set, Set, Set) may expose internal representation by storing an externally mutable object into BoardGameDto.ratings MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium
new com.codecool.bytebattlers.controller.dto.BoardGameDto(UUID, String, int, int, int, Set, int, String, UUID, String, Set, Set, Set) may expose internal representation by storing an externally mutable object into BoardGameDto.reviews MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium

com.codecool.bytebattlers.controller.dto.CategoryDto

Bug Category Details Line Priority
com.codecool.bytebattlers.controller.dto.CategoryDto.boardGames() may expose internal representation by returning CategoryDto.boardGames MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
new com.codecool.bytebattlers.controller.dto.CategoryDto(UUID, String, String, Set) may expose internal representation by storing an externally mutable object into CategoryDto.boardGames MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium

com.codecool.bytebattlers.controller.dto.PublisherDto

Bug Category Details Line Priority
com.codecool.bytebattlers.controller.dto.PublisherDto.boardGames() may expose internal representation by returning PublisherDto.boardGames MALICIOUS_CODE EI_EXPOSE_REP 10 Medium
new com.codecool.bytebattlers.controller.dto.PublisherDto(UUID, String, Set) may expose internal representation by storing an externally mutable object into PublisherDto.boardGames MALICIOUS_CODE EI_EXPOSE_REP2 10 Medium

com.codecool.bytebattlers.controller.exception.ErrorMessage

Bug Category Details Line Priority
com.codecool.bytebattlers.controller.exception.ErrorMessage.getTimestamp() may expose internal representation by returning ErrorMessage.timestamp MALICIOUS_CODE EI_EXPOSE_REP 23 Medium
new com.codecool.bytebattlers.controller.exception.ErrorMessage(int, Date, String, String) may expose internal representation by storing an externally mutable object into ErrorMessage.timestamp MALICIOUS_CODE EI_EXPOSE_REP2 13 Medium

com.codecool.bytebattlers.model.AppUser

Bug Category Details Line Priority
com.codecool.bytebattlers.model.AppUser.getFavoriteBoardGames() may expose internal representation by returning AppUser.favoriteBoardGames MALICIOUS_CODE EI_EXPOSE_REP 49 Medium
com.codecool.bytebattlers.model.AppUser.getRatings() may expose internal representation by returning AppUser.ratings MALICIOUS_CODE EI_EXPOSE_REP 52 Medium
com.codecool.bytebattlers.model.AppUser.getReviews() may expose internal representation by returning AppUser.reviews MALICIOUS_CODE EI_EXPOSE_REP 43 Medium
com.codecool.bytebattlers.model.AppUser.setFavoriteBoardGames(Set) may expose internal representation by storing an externally mutable object into AppUser.favoriteBoardGames MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.AppUser.setRatings(Set) may expose internal representation by storing an externally mutable object into AppUser.ratings MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.AppUser.setReviews(Set) may expose internal representation by storing an externally mutable object into AppUser.reviews MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium

com.codecool.bytebattlers.model.BoardGame

Bug Category Details Line Priority
com.codecool.bytebattlers.model.BoardGame.getCategories() may expose internal representation by returning BoardGame.categories MALICIOUS_CODE EI_EXPOSE_REP 43 Medium
com.codecool.bytebattlers.model.BoardGame.getPublisher() may expose internal representation by returning BoardGame.publisher MALICIOUS_CODE EI_EXPOSE_REP 53 Medium
com.codecool.bytebattlers.model.BoardGame.getRatings() may expose internal representation by returning BoardGame.ratings MALICIOUS_CODE EI_EXPOSE_REP 62 Medium
com.codecool.bytebattlers.model.BoardGame.getReviews() may expose internal representation by returning BoardGame.reviews MALICIOUS_CODE EI_EXPOSE_REP 56 Medium
com.codecool.bytebattlers.model.BoardGame.getUsersWhoFavorited() may expose internal representation by returning BoardGame.usersWhoFavorited MALICIOUS_CODE EI_EXPOSE_REP 59 Medium
com.codecool.bytebattlers.model.BoardGame.setCategories(Set) may expose internal representation by storing an externally mutable object into BoardGame.categories MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.BoardGame.setPublisher(Publisher) may expose internal representation by storing an externally mutable object into BoardGame.publisher MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.BoardGame.setRatings(Set) may expose internal representation by storing an externally mutable object into BoardGame.ratings MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.BoardGame.setReviews(Set) may expose internal representation by storing an externally mutable object into BoardGame.reviews MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.BoardGame.setUsersWhoFavorited(Set) may expose internal representation by storing an externally mutable object into BoardGame.usersWhoFavorited MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium

com.codecool.bytebattlers.model.Category

Bug Category Details Line Priority
com.codecool.bytebattlers.model.Category.getBoardGames() may expose internal representation by returning Category.boardGames MALICIOUS_CODE EI_EXPOSE_REP 39 Medium
com.codecool.bytebattlers.model.Category.setBoardGames(Set) may expose internal representation by storing an externally mutable object into Category.boardGames MALICIOUS_CODE EI_EXPOSE_REP2 16 Medium
com.codecool.bytebattlers.model.Category.equals(Object) checks for operand being a org.hibernate.proxy.HibernateProxy BAD_PRACTICE EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS 45 Medium

com.codecool.bytebattlers.model.Publisher

Bug Category Details Line Priority
com.codecool.bytebattlers.model.Publisher.getBoardGames() may expose internal representation by returning Publisher.boardGames MALICIOUS_CODE EI_EXPOSE_REP 33 Medium
com.codecool.bytebattlers.model.Publisher.setBoardGames(Set) may expose internal representation by storing an externally mutable object into Publisher.boardGames MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium

com.codecool.bytebattlers.model.Rating

Bug Category Details Line Priority
com.codecool.bytebattlers.model.Rating.getAppUser() may expose internal representation by returning Rating.appUser MALICIOUS_CODE EI_EXPOSE_REP 31 Medium
com.codecool.bytebattlers.model.Rating.getBoardGame() may expose internal representation by returning Rating.boardGame MALICIOUS_CODE EI_EXPOSE_REP 35 Medium
com.codecool.bytebattlers.model.Rating.setAppUser(AppUser) may expose internal representation by storing an externally mutable object into Rating.appUser MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.Rating.setBoardGame(BoardGame) may expose internal representation by storing an externally mutable object into Rating.boardGame MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.Rating.equals(Object) checks for operand being a org.hibernate.proxy.HibernateProxy BAD_PRACTICE EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS 45 Medium

com.codecool.bytebattlers.model.Review

Bug Category Details Line Priority
com.codecool.bytebattlers.model.Review.getAppUser() may expose internal representation by returning Review.appUser MALICIOUS_CODE EI_EXPOSE_REP 37 Medium
com.codecool.bytebattlers.model.Review.getBoardGame() may expose internal representation by returning Review.boardGame MALICIOUS_CODE EI_EXPOSE_REP 33 Medium
com.codecool.bytebattlers.model.Review.setAppUser(AppUser) may expose internal representation by storing an externally mutable object into Review.appUser MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.Review.setBoardGame(BoardGame) may expose internal representation by storing an externally mutable object into Review.boardGame MALICIOUS_CODE EI_EXPOSE_REP2 14 Medium
com.codecool.bytebattlers.model.Review.equals(Object) checks for operand being a org.hibernate.proxy.HibernateProxy BAD_PRACTICE EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS 44 Medium

com.codecool.bytebattlers.service.AppUserDetailService

Bug Category Details Line Priority
new com.codecool.bytebattlers.service.AppUserDetailService(AppUserRepository) may expose internal representation by storing an externally mutable object into AppUserDetailService.repository MALICIOUS_CODE EI_EXPOSE_REP2 16 Medium

com.codecool.bytebattlers.service.BoardGameService

Bug Category Details Line Priority
new com.codecool.bytebattlers.service.BoardGameService(BoardGameRepository, PublisherService, BoardGameMapper, CategoryRepository, AppUserRepository, RatingService) may expose internal representation by storing an externally mutable object into BoardGameService.appUserRepository MALICIOUS_CODE EI_EXPOSE_REP2 42 Medium
new com.codecool.bytebattlers.service.BoardGameService(BoardGameRepository, PublisherService, BoardGameMapper, CategoryRepository, AppUserRepository, RatingService) may expose internal representation by storing an externally mutable object into BoardGameService.boardGameRepository MALICIOUS_CODE EI_EXPOSE_REP2 38 Medium
new com.codecool.bytebattlers.service.BoardGameService(BoardGameRepository, PublisherService, BoardGameMapper, CategoryRepository, AppUserRepository, RatingService) may expose internal representation by storing an externally mutable object into BoardGameService.categoryRepository MALICIOUS_CODE EI_EXPOSE_REP2 41 Medium
new com.codecool.bytebattlers.service.BoardGameService(BoardGameRepository, PublisherService, BoardGameMapper, CategoryRepository, AppUserRepository, RatingService) may expose internal representation by storing an externally mutable object into BoardGameService.publisherService MALICIOUS_CODE EI_EXPOSE_REP2 39 Medium
new com.codecool.bytebattlers.service.BoardGameService(BoardGameRepository, PublisherService, BoardGameMapper, CategoryRepository, AppUserRepository, RatingService) may expose internal representation by storing an externally mutable object into BoardGameService.ratingService MALICIOUS_CODE EI_EXPOSE_REP2 43 Medium

com.codecool.bytebattlers.service.CategoryService

Bug Category Details Line Priority
new com.codecool.bytebattlers.service.CategoryService(CategoryRepository, CategoryMapper) may expose internal representation by storing an externally mutable object into CategoryService.categoryRepository MALICIOUS_CODE EI_EXPOSE_REP2 21 Medium

com.codecool.bytebattlers.service.PublisherService

Bug Category Details Line Priority
new com.codecool.bytebattlers.service.PublisherService(PublisherMapper, PublisherRepository) may expose internal representation by storing an externally mutable object into PublisherService.repository MALICIOUS_CODE EI_EXPOSE_REP2 21 Medium

com.codecool.bytebattlers.service.RatingService

Bug Category Details Line Priority
new com.codecool.bytebattlers.service.RatingService(RatingMapper, RatingRepository, BoardGameRepository, AppUserRepository) may expose internal representation by storing an externally mutable object into RatingService.appUserRepository MALICIOUS_CODE EI_EXPOSE_REP2 34 Medium
new com.codecool.bytebattlers.service.RatingService(RatingMapper, RatingRepository, BoardGameRepository, AppUserRepository) may expose internal representation by storing an externally mutable object into RatingService.boardGameRepository MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium

com.codecool.bytebattlers.service.ReviewService

Bug Category Details Line Priority
new com.codecool.bytebattlers.service.ReviewService(ReviewMapper, ReviewRepository, UserService, BoardGameService) may expose internal representation by storing an externally mutable object into ReviewService.boardGameService MALICIOUS_CODE EI_EXPOSE_REP2 28 Medium
new com.codecool.bytebattlers.service.ReviewService(ReviewMapper, ReviewRepository, UserService, BoardGameService) may expose internal representation by storing an externally mutable object into ReviewService.reviewRepository MALICIOUS_CODE EI_EXPOSE_REP2 26 Medium
new com.codecool.bytebattlers.service.ReviewService(ReviewMapper, ReviewRepository, UserService, BoardGameService) may expose internal representation by storing an externally mutable object into ReviewService.userService MALICIOUS_CODE EI_EXPOSE_REP2 27 Medium

com.codecool.bytebattlers.service.UserService

Bug Category Details Line Priority
new com.codecool.bytebattlers.service.UserService(PasswordEncoder, AppUserRepository, AppUserMapper, JwtService, AuthenticationManager, UserDetailsService, BoardGameRepository) may expose internal representation by storing an externally mutable object into UserService.boardGameRepository MALICIOUS_CODE EI_EXPOSE_REP2 45 Medium
new com.codecool.bytebattlers.service.UserService(PasswordEncoder, AppUserRepository, AppUserMapper, JwtService, AuthenticationManager, UserDetailsService, BoardGameRepository) may expose internal representation by storing an externally mutable object into UserService.userRepository MALICIOUS_CODE EI_EXPOSE_REP2 40 Medium