private static Serializer<?> getSerializer(Kryo kryo, Class<?> type) {
        Registration registration = kryo.getClassResolver().getRegistration(type);
        return registration != null ? registration.getSerializer() : null;
    }
private static Serializer<?> getSerializer(Kryo kryo, Class<?> type) {
        Registration registration = kryo.getClassResolver().getRegistration(type);
        return registration != null ? registration.getSerializer() : null;
    }
private static Serializer < ? > getSerializer ( Kryo kryo , Class < ? > type ) { Registration registration = kryo . getClassResolver ( ) . getRegistration ( type ) ; return registration != null ? registration . getSerializer ( ) : null ; }
/* kryo.getSerializer (invoking kryo.getRegistration) throws an exception if registration is required,
therefore we're getting a potentially existing serializer on another way.
/ * kryo . getSerializer ( invoking kryo . getRegistration ) throws an exception if registration is required therefore we re getting a potentially existing serializer on another way .