Skip to content

Commit 0d18586

Browse files
committed
Polishing.
Use constructor delegation in DefaultCodecs. [#444][#409] Signed-off-by: Mark Paluch <[email protected]>
1 parent 0b52b0f commit 0d18586

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/io/r2dbc/postgresql/codec/DefaultCodecs.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ public DefaultCodecs(ByteBufAllocator byteBufAllocator) {
5858
* @param preferAttachedBuffers whether to prefer attached (pooled) {@link ByteBuf buffers}. Use {@code false} (default) to use detached buffers which minimize the risk of memory leaks.
5959
*/
6060
public DefaultCodecs(ByteBufAllocator byteBufAllocator, boolean preferAttachedBuffers) {
61-
62-
Assert.requireNonNull(byteBufAllocator, "byteBufAllocator must not be null");
63-
64-
this.codecs = getDefaultCodecs(byteBufAllocator, preferAttachedBuffers);
65-
this.codecLookup = new CachedCodecLookup(new DefaultCodecLookup(this));
61+
this(byteBufAllocator, preferAttachedBuffers, CachedCodecLookup::new);
6662
}
6763

6864
/**

0 commit comments

Comments
 (0)