@SuppressWarnings("unchecked") @Nullable private <T> T convertAndReturn(@Nullable Object value, Converter converter) { if (isFutureConversion()) { addResultConverter(converter); return null; } if (!(converter instanceof ListConverter) && value instanceof List) { return (T) new ListConverter<>(converter).convert((List) value); } return value == null ? null : ObjectUtils.nullSafeEquals(converter, identityConverter) ? (T) value : (T) converter.convert(value); }
@Override public List<Long> bitfield(String key, BitFieldSubCommands operation) { List<Long> results = delegate.bitField(serialize(key), operation); if (isFutureConversion()) { addResultConverter(identityConverter); } return results; }
@SuppressWarnings("unchecked") @Nullable private <T> T convertAndReturn(@Nullable Object value, Converter converter) { if (isFutureConversion()) { addResultConverter(converter); return null; } return value == null ? null : ObjectUtils.nullSafeEquals(converter, identityConverter) ? (T) value : (T) converter.convert(value); }
@SuppressWarnings("unchecked") @Nullable private <T> T convertAndReturn(@Nullable Object value, Converter converter) { if (isFutureConversion()) { addResultConverter(converter); return null; } return value == null ? null : ObjectUtils.nullSafeEquals(converter, identityConverter) ? (T) value : (T) converter.convert(value); }
@Override public List<Long> bitfield(String key, BitFieldSubCommands operation) { List<Long> results = delegate.bitField(serialize(key), operation); if (isFutureConversion()) { addResultConverter(identityConverter); } return results; }
@Override public List<Long> bitfield(String key, BitFieldSubCommands operation) { List<Long> results = delegate.bitField(serialize(key), operation); if (isFutureConversion()) { addResultConverter(identityConverter); } return results; }