Skip to content

Commit adf6da1

Browse files
committed
refactor: hide mutable primitive codec array
PRIMITIVE_CODECS is an array, so final only prevents reassigning the field; callers that can reach a public field can still mutate its contents. The array is only used by codec registry internals, so keep it package-private instead of exposing mutable static state. This avoids MutablePublicArray-style warnings without changing registry behavior.
1 parent a09f309 commit adf6da1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/registry/CodecRegistryConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class CodecRegistryConstants {
3232
* DefaultCodecRegistry#DefaultCodecRegistry(String, int, BiFunction, int, BiConsumer,
3333
* TypeCodec[])} but only customize the caching options.
3434
*/
35-
public static final TypeCodec<?>[] PRIMITIVE_CODECS =
35+
static final TypeCodec<?>[] PRIMITIVE_CODECS =
3636
new TypeCodec<?>[] {
3737
// Must be declared before AsciiCodec so it gets chosen when CQL type not available
3838
TypeCodecs.TEXT,

0 commit comments

Comments
 (0)