Fix regression in AbstractJackson2Encoder

Closes gh-29274
This commit is contained in:
rstoyanchev
2022-10-07 18:05:35 +01:00
parent b3afafbf5a
commit 1afc1fc90d
2 changed files with 9 additions and 0 deletions

View File

@@ -198,6 +198,7 @@ public abstract class AbstractJackson2Encoder extends Jackson2CodecSupport imple
bufferFactory.join(Arrays.asList(bufferFactory.wrap(prefix), dataBuffer)) :
dataBuffer);
})
.switchIfEmpty(Mono.fromCallable(() -> bufferFactory.wrap(helper.getPrefix())))
.concatWith(Mono.fromCallable(() -> bufferFactory.wrap(helper.getSuffix())));
}