Skip to content

Commit

Permalink
print ln
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbalcaen committed Apr 19, 2024
1 parent b870666 commit 02305b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ public App(S3Service s3Service) {
}

public String handleRequest(final S3EventNotification input, final Context context) {
try {
String json = objectMapper.writeValueAsString(input);
System.out.println(json);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}

List<PutObjectResponse> responses = new ArrayList<>();

input.getRecords().forEach(s3EventNotificationRecord -> {
Expand All @@ -57,9 +50,12 @@ public String handleRequest(final S3EventNotification input, final Context conte
});

try {
return objectMapper.writeValueAsString(
new Response(200, responses.stream().map(PutObjectResponse::toString).toList())
);
var response = objectMapper.writeValueAsString(
new Response(200, responses.stream().map(PutObjectResponse::toString).toList())
);
System.out.println(response);
return response;

} catch (JsonProcessingException e) {
e.printStackTrace();
new Response(400, List.of("Error processing request"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public List<Part> getAttachments(S3EventNotification.S3Entity s3Entity) throws M
.build();

ResponseBytes<GetObjectResponse> objectBytes = s3.getObjectAsBytes(objectRequest);
System.out.println(new String(objectBytes.asByteArray()));
InputStream inputStream = objectBytes.asInputStream();

Properties props = new Properties();
Expand Down

0 comments on commit 02305b3

Please sign in to comment.