Satisfy Sonarqube Issues
This commit is contained in:
parent
41b64e0094
commit
1c393ead47
@ -38,7 +38,7 @@ public class GetProjectAction {
|
|||||||
Optional<ProjectEntity> project = this.projectService.findById(id);
|
Optional<ProjectEntity> project = this.projectService.findById(id);
|
||||||
|
|
||||||
if (project.isEmpty()) {
|
if (project.isEmpty()) {
|
||||||
return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);
|
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ResponseEntity<>(this.projectMapper.mapToGetDto(project.get()), HttpStatus.OK);
|
return new ResponseEntity<>(this.projectMapper.mapToGetDto(project.get()), HttpStatus.OK);
|
||||||
|
@ -3,8 +3,6 @@ package de.szut.lf8_starter.project.dto;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonNaming;
|
import com.fasterxml.jackson.databind.annotation.JsonNaming;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||||
|
Loading…
Reference in New Issue
Block a user