Skip to content

Commit df4a108

Browse files
committed
fix compilation errors in jersey
1 parent e424240 commit df4a108

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.amazonaws.serverless.proxy.model.AwsProxyResponse;
2525
import com.amazonaws.serverless.proxy.model.HttpApiV2ProxyRequest;
2626
import com.amazonaws.services.lambda.runtime.Context;
27-
import tools.jackson.core.JsonProcessingException;
27+
import tools.jackson.core.JacksonException;
2828
import tools.jackson.databind.ObjectMapper;
2929
import org.apache.commons.codec.binary.Base64;
3030
import org.glassfish.jersey.logging.LoggingFeature;
@@ -303,7 +303,7 @@ void error_statusCode_methodNotAllowed(String reqType) {
303303

304304
@MethodSource("data")
305305
@ParameterizedTest
306-
void responseBody_responseWriter_validBody(String reqType) throws JsonProcessingException {
306+
void responseBody_responseWriter_validBody(String reqType) throws JacksonException {
307307
initJerseyAwsProxyTest(reqType);
308308
SingleValueModel singleValueModel = new SingleValueModel();
309309
singleValueModel.setValue(CUSTOM_HEADER_VALUE);
@@ -460,7 +460,7 @@ private void validateMapResponseModel(AwsProxyResponse output, String key, Strin
460460
MapResponseModel response = objectMapper.readValue(output.getBody(), MapResponseModel.class);
461461
assertNotNull(response.getValues().get(key));
462462
assertEquals(value, response.getValues().get(key));
463-
} catch (IOException e) {
463+
} catch (JacksonException e) {
464464
e.printStackTrace();
465465
fail("Exception while parsing response body: " + e.getMessage());
466466
}
@@ -471,7 +471,7 @@ private void validateSingleValueModel(AwsProxyResponse output, String value) {
471471
SingleValueModel response = objectMapper.readValue(output.getBody(), SingleValueModel.class);
472472
assertNotNull(response.getValue());
473473
assertEquals(value, response.getValue());
474-
} catch (IOException e) {
474+
} catch (JacksonException e) {
475475
e.printStackTrace();
476476
fail("Exception while parsing response body: " + e.getMessage());
477477
}

aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyParamEncodingTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.amazonaws.services.lambda.runtime.Context;
1313

1414
import tools.jackson.databind.ObjectMapper;
15+
import tools.jackson.core.JacksonException;
1516
import org.glassfish.jersey.media.multipart.MultiPartFeature;
1617
import org.glassfish.jersey.server.ResourceConfig;
1718
import org.junit.jupiter.api.Disabled;
@@ -281,7 +282,7 @@ private void validateSingleValueModel(AwsProxyResponse output, String value) {
281282
SingleValueModel response = objectMapper.readValue(output.getBody(), SingleValueModel.class);
282283
assertNotNull(response.getValue());
283284
assertEquals(value, response.getValue());
284-
} catch (IOException e) {
285+
} catch (JacksonException e) {
285286
e.printStackTrace();
286287
fail("Exception while parsing response body: " + e.getMessage());
287288
}
@@ -292,7 +293,7 @@ private void validateMapResponseModel(AwsProxyResponse output, String key, Strin
292293
MapResponseModel response = objectMapper.readValue(output.getBody(), MapResponseModel.class);
293294
assertNotNull(response.getValues().get(key));
294295
assertEquals(value, response.getValues().get(key));
295-
} catch (IOException e) {
296+
} catch (JacksonException e) {
296297
e.printStackTrace();
297298
fail("Exception while parsing response body: " + e.getMessage());
298299
}

0 commit comments

Comments
 (0)