cwt-wa / cwt

Crespo’s Worms Tournament (CWT) is the most prestigious tournament of Team17’s strategy game title Worms Armageddon held annually since 2002.
https://cwtsite.com/
5 stars 2 forks source link

Set Spring Open In View to false #255

Open Zemke opened 3 years ago

Zemke commented 3 years ago

Good integration tests for CWT should cover

Zemke commented 3 years ago

Some if not all integration tests are failing when open-in-view is set to false. That’s a good starting point.

Zemke commented 3 years ago

First step is to put toDto/fromDto mapping logic into a transactional context since a lot of lazy loading is going to take place there and therefore a Hibernate sessions needs to be available.

That’s been done semi-automated, therefore here are some compiler warnings to fix:

game/view/GameRestController.kt: (51, 13) Variable 'emissions' is never used
game/view/mapper/BetMapper.kt: (17, 48) Unnecessary non-null assertion (!!) on a non-null receiver of type User
game/view/mapper/BetMapper.kt: (17, 76) Unnecessary non-null assertion (!!) on a non-null receiver of type User
game/view/mapper/RatingMapper.kt: (16, 51) Unnecessary non-null assertion (!!) on a non-null receiver of type User
game/view/mapper/RatingMapper.kt: (16, 82) Unnecessary non-null assertion (!!) on a non-null receiver of type User
message/view/mapper/MessageMapper.kt: (20, 73) Unnecessary non-null assertion (!!) on a non-null receiver of type User
message/view/mapper/MessageMapper.kt: (20, 95) Unnecessary non-null assertion (!!) on a non-null receiver of type User
message/view/mapper/MessageMapper.kt: (21, 56) Unnecessary non-null assertion (!!) on a non-null receiver of type User
message/view/mapper/MessageMapper.kt: (21, 90) Unnecessary non-null assertion (!!) on a non-null receiver of type User
schedule/view/mapper/ScheduleMapper.kt: (18, 61) Unnecessary non-null assertion (!!) on a non-null receiver of type User
schedule/view/mapper/ScheduleMapper.kt: (18, 98) Unnecessary non-null assertion (!!) on a non-null receiver of type User
schedule/view/mapper/ScheduleMapper.kt: (19, 61) Unnecessary non-null assertion (!!) on a non-null receiver of type User
schedule/view/mapper/ScheduleMapper.kt: (19, 98) Unnecessary non-null assertion (!!) on a non-null receiver of type User
schedule/view/mapper/ScheduleMapper.kt: (21, 57) Unnecessary non-null assertion (!!) on a non-null receiver of type User
schedule/view/mapper/ScheduleMapper.kt: (21, 92) Unnecessary non-null assertion (!!) on a non-null receiver of type User
stream/view/mapper/ChannelMapper.kt: (17, 52) Unnecessary non-null assertion (!!) on a non-null receiver of type User
stream/view/mapper/ChannelMapper.kt: (17, 84) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tetris/view/mapper/TetrisMapper.kt: (25, 59) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tetris/view/mapper/TetrisMapper.kt: (25, 90) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/PlayoffTreeBetMapper.kt: (15, 48) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/PlayoffTreeBetMapper.kt: (15, 76) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/StandingMapper.kt: (19, 53) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/StandingMapper.kt: (19, 86) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (18, 77) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (18, 99) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (19, 81) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (19, 103) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (20, 81) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (20, 103) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (21, 76) Unnecessary non-null assertion (!!) on a non-null receiver of type User
tournament/view/mapper/TournamentMapper.kt: (21, 98) Unnecessary non-null assertion (!!) on a non-null receiver of type User

Also the DTO classes still have their static mapping methods and they’re still used. Remove them and replace usages with the new mapper beans.