Skip to content

Commit ce97d4b

Browse files
committed
feature: amp-106 further tidy project
* Fixup finals for madhu merge request
1 parent fa37a16 commit ce97d4b

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/apiTest/java/uk/gov/hmcts/cp/http/ActuatorHttpLiveTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import static org.assertj.core.api.Assertions.assertThat;
99

10-
class ActuatorHttpLiveTest {
10+
class ActuatorHttpLiveTest {
1111

1212
private final String baseUrl = System.getProperty("app.baseUrl", "http://localhost:8082");
1313
private final RestTemplate http = new RestTemplate();
@@ -23,7 +23,7 @@ void health_is_up() {
2323
assertThat(res.getBody()).contains("\"status\":\"UP\"");
2424
}
2525

26-
@Disabled
26+
@Disabled // Lets revisit this during our monitoring spike
2727
@Test
2828
void prometheus_is_exposed() {
2929
final HttpHeaders httpHeaders = new HttpHeaders();

src/main/java/uk/gov/hmcts/cp/controllers/ExampleController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ExampleController implements ExamplesApi {
1818
private final ExampleService exampleService;
1919

2020
@Override
21-
public ResponseEntity<ExampleResponse> getExampleByExampleId(@PathVariable("example_id") @NotNull Long exampleId) {
21+
public ResponseEntity<ExampleResponse> getExampleByExampleId(@PathVariable("example_id") @NotNull final Long exampleId) {
2222

2323
log.info("getExampleByExampleId example for {}", exampleId);
2424
return ResponseEntity.ok(exampleService.getExampleById(exampleId));

src/main/java/uk/gov/hmcts/cp/mappers/ExampleMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
import uk.gov.hmcts.cp.entities.ExampleEntity;
77
import uk.gov.hmcts.cp.openapi.model.ExampleResponse;
88

9+
@FunctionalInterface
910
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
1011
public interface ExampleMapper {
1112

1213
@Mapping(source = "id", target = "exampleId")
13-
public abstract ExampleResponse mapExampleToResponse(ExampleEntity exampleEntity);
14+
ExampleResponse mapExampleToResponse(ExampleEntity exampleEntity);
1415
}

src/main/java/uk/gov/hmcts/cp/services/ExampleService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class ExampleService {
1717
private final ExampleMapper exampleMapper;
1818

1919
public ExampleResponse getExampleById(final long exampleId) {
20-
ExampleEntity entity = exampleRepository.findById(exampleId).orElseThrow();
20+
final ExampleEntity entity = exampleRepository.findById(exampleId).orElseThrow();
2121
return exampleMapper.mapExampleToResponse(entity);
2222
}
2323

0 commit comments

Comments
 (0)