} else if (rootType instanceof BitsTypeDefinition) {
return BitsCodec.of(typeClz, (BitsTypeDefinition) rootType);
} else {
- return EncapsulatedValueCodec.of(typeClz, def);
+ return EncapsulatedValueCodec.of(typeClz);
}
} catch (ExecutionException e) {
throw new IllegalStateException(e);