Skip to content

Commit

Permalink
[hotfix] [formats] Make ObjectMapper final in JsonNodeDeserialization…
Browse files Browse the repository at this point in the history
…Schema
  • Loading branch information
twalthr committed Mar 1, 2018
1 parent 6ad626a commit b2a1b49
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ public class JsonNodeDeserializationSchema extends AbstractDeserializationSchema

private static final long serialVersionUID = -1699854177598621044L;

private ObjectMapper mapper;
private final ObjectMapper mapper = new ObjectMapper();

@Override
public ObjectNode deserialize(byte[] message) throws IOException {
if (mapper == null) {
mapper = new ObjectMapper();
}
return mapper.readValue(message, ObjectNode.class);
}
}

0 comments on commit b2a1b49

Please sign in to comment.