fix IDE warnings

This commit is contained in:
2026-02-04 20:56:05 +01:00
parent a90d518fc3
commit 41fda9770a
10 changed files with 6 additions and 25 deletions

View File

@@ -17,7 +17,6 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.UUID;
@RestController
@RequestMapping("/racers")

View File

@@ -29,7 +29,7 @@ public class TeamRestController {
/**
* Creates a team with the information provided via the /teams/createTeam endpoint
* @param team
* @param team Team object with the information to be used on creation
* @return a ResponseEntity,
* either containing a TeamWSTO if a team was successfully created or a HttpStatus.CONFLICT if the team already existed beforehand
*/

View File

@@ -1,7 +1,6 @@
package de.pnreichmuth.timekeep_backend.exceptions;
import de.pnreichmuth.timekeep_backend.entities.Racer;
import de.pnreichmuth.timekeep_backend.entities.Team;
import lombok.extern.slf4j.Slf4j;
@Slf4j

View File

@@ -1,8 +1,6 @@
package de.pnreichmuth.timekeep_backend.exceptions;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@Slf4j
public class RacerNotFoundException extends NotFoundException {

View File

@@ -2,8 +2,6 @@ package de.pnreichmuth.timekeep_backend.exceptions;
import de.pnreichmuth.timekeep_backend.entities.Team;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@Slf4j
public class TeamExistsException extends ExistsException {

View File

@@ -1,8 +1,6 @@
package de.pnreichmuth.timekeep_backend.exceptions;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@Slf4j
public class TeamNotFoundException extends NotFoundException {

View File

@@ -1,12 +1,10 @@
package de.pnreichmuth.timekeep_backend.repositories;
import de.pnreichmuth.timekeep_backend.entities.Racer;
import de.pnreichmuth.timekeep_backend.entities.Team;
import lombok.NonNull;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Optional;
import java.util.UUID;

View File

@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
@Service
@Slf4j

View File

@@ -8,7 +8,7 @@ package de.pnreichmuth.timekeep_backend.spring_configs;
//
//
//@Configuration
////@EnableWebSecurity
//@EnableWebSecurity
//public class TimekeepBackendSecurityConfig {
// @Bean
// public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {

View File

@@ -20,14 +20,10 @@ public record TeamWSTO(String teamName,
public static TeamWSTO of(Team team){
List<RacerWSTO> tempMemberList = new ArrayList<>();
team.getMembers().forEach(member -> {
tempMemberList.add(RacerWSTO.of(member));
});
team.getMembers().forEach(member -> tempMemberList.add(RacerWSTO.of(member)));
List<StationWSTO> tempStationList = new ArrayList<>();
team.getPassedStations().forEach(passedStation -> {
tempStationList.add(StationWSTO.of(passedStation));
});
team.getPassedStations().forEach(passedStation -> tempStationList.add(StationWSTO.of(passedStation)));
return new TeamWSTO(
team.getTeamName(),
@@ -39,14 +35,10 @@ public record TeamWSTO(String teamName,
public static Team toEntity(TeamWSTO teamWSTO){
List<Racer> tempMemberList = new ArrayList<>();
teamWSTO.teamMembers().forEach(member -> {
tempMemberList.add(RacerWSTO.toEntity(member));
});
teamWSTO.teamMembers().forEach(member -> tempMemberList.add(RacerWSTO.toEntity(member)));
List<Station> tempStationList = new ArrayList<>();
teamWSTO.passedStations().forEach(passedStation -> {
tempStationList.add(StationWSTO.toEntity(passedStation));
});
teamWSTO.passedStations().forEach(passedStation -> tempStationList.add(StationWSTO.toEntity(passedStation)));
return new Team(
teamWSTO.teamName(),