diff --git a/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java b/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java index 2f8c0bbb5f..65bfbe36d9 100644 --- a/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java +++ b/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java @@ -4035,8 +4035,7 @@ public String writeValueAsString(Object value) throws JsonProcessingException { // alas, we have to pull the recycler directly here... - try (SegmentedStringWriter sw = new SegmentedStringWriter(_jsonFactory._getBufferRecycler()); -){ + try (SegmentedStringWriter sw = new SegmentedStringWriter(_jsonFactory._getBufferRecycler())) { _writeValueAndClose(createGenerator(sw), value); return sw.getAndClear(); } catch (JsonProcessingException e) {