Skip to content

Commit

Permalink
Bump to Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
docwho2 committed Jul 29, 2024
1 parent 70f86b8 commit ad8f9e8
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestStreamHandler;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -61,6 +62,10 @@ public abstract class AbstractFlow implements RequestStreamHandler {
public final static String CURRENT_ACTION_ID = "CurrentActionId";
public final static String CURRENT_ACTION_ID_LIST = "CurrentActionIdList";

static {
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}

protected AbstractFlow() {
if (startAction == null) {
log.debug("Starting to Build Static Flow");
Expand Down Expand Up @@ -214,12 +219,11 @@ private Action getCurrentAction(SMARequest event) throws CloneNotSupportedExcept
return action;
}


@Override
@Override
public void handleRequest(InputStream in, OutputStream out, Context cntxt) throws IOException {
mapper.writeValue(out, handleRequest( mapper.readValue(in, SMARequest.class),cntxt ));
mapper.writeValue(out, handleRequest(mapper.readValue(in, SMARequest.class), cntxt));
}

public final SMAResponse handleRequest(SMARequest event, Context cntxt) {
try {
log.debug(event);
Expand Down

0 comments on commit ad8f9e8

Please sign in to comment.