Change SslOptions to use null for defaults rather than empty sets
Update `SslOptions` so that `null` is used for default values rather than empty sets. Most libraries use `null` to indicate defaults so aligning our class makes things easier. See gh-34814
This commit is contained in:
@@ -58,7 +58,6 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -159,8 +158,7 @@ public class CassandraAutoConfiguration {
|
||||
|
||||
private void configureSsl(CqlSessionBuilder builder, SslBundle sslBundle) {
|
||||
SslOptions options = sslBundle.getOptions();
|
||||
String[] ciphers = (!CollectionUtils.isEmpty(options.getCiphers()) ? null
|
||||
: options.getCiphers().toArray(String[]::new));
|
||||
String[] ciphers = (options.getCiphers() != null) ? options.getCiphers().toArray(String[]::new) : null;
|
||||
builder.withSslEngineFactory(new ProgrammaticSslEngineFactory(sslBundle.createSslContext(), ciphers));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user