Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
Signed-off-by: BOUHOURS Antoine <[email protected]>
  • Loading branch information
antoinebhs committed Sep 23, 2024
1 parent de1e708 commit a370698
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ public <T extends IdentifiableAttributes> void createAll(String url, List<Resour

@Override
public <T extends IdentifiableAttributes> Optional<Resource<T>> getOne(String target, String url, Object... uriVariables) {
return getOneDocument(target, url, new ParameterizedTypeReference<TopLevelDocument<T>>() {
return getOneDocument(url, new ParameterizedTypeReference<TopLevelDocument<T>>() {
}, uriVariables);
}

@Override
public Optional<ExtensionAttributes> getOneExtensionAttributes(String url, Object... uriVariables) {
return getOneDocument(null, url, new ParameterizedTypeReference<ExtensionAttributesTopLevelDocument>() {
return getOneDocument(url, new ParameterizedTypeReference<ExtensionAttributesTopLevelDocument>() {
}, uriVariables);
}

public <T, D extends AbstractTopLevelDocument<T>> Optional<T> getOneDocument(String target, String url, ParameterizedTypeReference<D> parameterizedTypeReference, Object... uriVariables) {
private <T, D extends AbstractTopLevelDocument<T>> Optional<T> getOneDocument(String url, ParameterizedTypeReference<D> parameterizedTypeReference, Object... uriVariables) {
ResponseEntity<D> response = getDocument(url, parameterizedTypeReference, uriVariables);
if (response.getStatusCode() == HttpStatus.OK) {
AbstractTopLevelDocument<T> body = getBody(response);
Expand Down

0 comments on commit a370698

Please sign in to comment.