Skip to content

Commit 6cab616

Browse files
authored
Avoid a NullPointerException...
If we don't do an early exit after line 30, line 36 (37 above) will throw an NPE... (Another way would be to throw new IOException(e) instead of printStacktrace)
1 parent 88adfdf commit 6cab616

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

samples/spring/pet-store/src/main/java/com/amazonaws/serverless/sample/spring/StreamLambdaHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public void handleRequest(InputStream inputStream, OutputStream outputStream, Co
2828
} catch (ContainerInitializationException e) {
2929
e.printStackTrace();
3030
outputStream.close();
31+
return;
3132
}
3233
}
3334

0 commit comments

Comments
 (0)