@@ -111,7 +111,7 @@ private static List<Codec<?>> getDefaultCodecs(ByteBufAllocator byteBufAllocator
111111            new  BigDecimalCodec (byteBufAllocator ),
112112            new  BigIntegerCodec (byteBufAllocator ),
113113            new  BooleanCodec (byteBufAllocator ),
114-             new  CharacterCodec (byteBufAllocator ),
114+             new  CharacterCodecProvider (byteBufAllocator ),
115115            new  DoubleCodec (byteBufAllocator ),
116116            new  FloatCodec (byteBufAllocator ),
117117            new  InetAddressCodec (byteBufAllocator ),
@@ -159,7 +159,7 @@ private static List<Codec<?>> getDefaultCodecs(ByteBufAllocator byteBufAllocator
159159            new  PolygonCodec (byteBufAllocator )
160160        ));
161161
162-         List <Codec <?>> defaultArrayCodecs  = new  ArrayList <>();
162+         List <Codec <?>> additionalCodecs  = new  ArrayList <>();
163163
164164        for  (Codec <?> codec  : codecs ) {
165165
@@ -171,18 +171,22 @@ private static List<Codec<?>> getDefaultCodecs(ByteBufAllocator byteBufAllocator
171171
172172                if  (codec  instanceof  BoxCodec ) {
173173                    // BOX[] uses a ';' as a delimiter (i.e. "{(3.7,4.6),(1.9,2.8);(5,7),(1.5,3.3)}") 
174-                     defaultArrayCodecs .add (new  ArrayCodec (byteBufAllocator , delegate .getArrayDataType (), delegate , componentType , (byte ) ';' ));
174+                     additionalCodecs .add (new  ArrayCodec (byteBufAllocator , delegate .getArrayDataType (), delegate , componentType , (byte ) ';' ));
175175                } else  if  (codec  instanceof  AbstractNumericCodec ) {
176-                     defaultArrayCodecs .add (new  ConvertingArrayCodec (byteBufAllocator , delegate , componentType , ConvertingArrayCodec .NUMERIC_ARRAY_TYPES ));
176+                     additionalCodecs .add (new  ConvertingArrayCodec (byteBufAllocator , delegate , componentType , ConvertingArrayCodec .NUMERIC_ARRAY_TYPES ));
177177                } else  if  (codec  instanceof  AbstractTemporalCodec ) {
178-                     defaultArrayCodecs .add (new  ConvertingArrayCodec (byteBufAllocator , delegate , componentType , ConvertingArrayCodec .DATE_ARRAY_TYPES ));
178+                     additionalCodecs .add (new  ConvertingArrayCodec (byteBufAllocator , delegate , componentType , ConvertingArrayCodec .DATE_ARRAY_TYPES ));
179179                } else  {
180-                     defaultArrayCodecs .add (new  ArrayCodec (byteBufAllocator , delegate , componentType ));
180+                     additionalCodecs .add (new  ArrayCodec (byteBufAllocator , delegate , componentType ));
181181                }
182182            }
183+ 
184+             if  (codec  instanceof  PrimitiveWrapperCodecProvider <?>) {
185+                 additionalCodecs .add (((PrimitiveWrapperCodecProvider <?>) codec ).getPrimitiveCodec ());
186+             }
183187        }
184188
185-         codecs .addAll (defaultArrayCodecs );
189+         codecs .addAll (additionalCodecs );
186190
187191        return  codecs ;
188192    }
0 commit comments