Skip to content

Commit 46b0173

Browse files
committed
fix the validation rule
1 parent 320d405 commit 46b0173

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

validator/src/main/java/com/amazon/aoc/callers/HttpCaller.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import com.amazon.aoc.helpers.RetryHelper;
77
import com.amazon.aoc.models.SampleAppResponse;
88
import com.fasterxml.jackson.core.JsonProcessingException;
9-
import com.fasterxml.jackson.databind.JsonMappingException;
109
import com.fasterxml.jackson.databind.ObjectMapper;
1110
import lombok.extern.log4j.Log4j2;
1211
import okhttp3.OkHttpClient;
@@ -39,14 +38,16 @@ public SampleAppResponse callSampleApp() throws Exception {
3938
throw new BaseException(ExceptionCode.DATA_EMITTER_UNAVAILABLE);
4039
}
4140
SampleAppResponse sampleAppResponse = null;
42-
try{
43-
sampleAppResponse = new ObjectMapper().readValue(responseBody, SampleAppResponse.class);
44-
}catch (JsonProcessingException ex){
41+
try {
42+
sampleAppResponse =
43+
new ObjectMapper().readValue(responseBody, SampleAppResponse.class);
44+
} catch (JsonProcessingException ex) {
4545
// try to get the trace id from header
4646
// this is a specific logic for xray sdk, which injects trace id in header
4747
log.info("getting trace id from header");
4848
// X-Amzn-Trace-Id: Root=1-5f84a611-f2f5df6827016222af9d8b60
49-
String traceId = response.header(GenericConstants.HTTP_HEADER_TRACE_ID.getVal()).substring(5);
49+
String traceId =
50+
response.header(GenericConstants.HTTP_HEADER_TRACE_ID.getVal()).substring(5);
5051
sampleAppResponse = new SampleAppResponse();
5152
sampleAppResponse.setTraceId(traceId);
5253
}

0 commit comments

Comments
 (0)