fix NPE
This commit is contained in:
parent
30ac8b09c2
commit
edb85cfdd8
3 changed files with 6 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,5 +9,5 @@
|
||||||
/.project
|
/.project
|
||||||
/.gradle
|
/.gradle
|
||||||
/build
|
/build
|
||||||
/out
|
out
|
||||||
*~
|
*~
|
|
@ -71,6 +71,10 @@ test {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clean {
|
||||||
|
delete 'out'
|
||||||
|
}
|
||||||
|
|
||||||
asciidoctor {
|
asciidoctor {
|
||||||
attributes toc: 'left',
|
attributes toc: 'left',
|
||||||
doctype: 'book',
|
doctype: 'book',
|
||||||
|
|
|
@ -104,7 +104,7 @@ public final class Client {
|
||||||
this.http2ResponseHandler = new Http2ResponseHandler();
|
this.http2ResponseHandler = new Http2ResponseHandler();
|
||||||
this.transports = new CopyOnWriteArrayList<>();
|
this.transports = new CopyOnWriteArrayList<>();
|
||||||
List<HttpAddress> nodes = clientConfig.getNodes();
|
List<HttpAddress> nodes = clientConfig.getNodes();
|
||||||
if (!nodes.isEmpty()) {
|
if (nodes != null && !nodes.isEmpty()) {
|
||||||
Integer limit = clientConfig.getNodeConnectionLimit();
|
Integer limit = clientConfig.getNodeConnectionLimit();
|
||||||
if (limit == null || limit > nodes.size()) {
|
if (limit == null || limit > nodes.size()) {
|
||||||
limit = nodes.size();
|
limit = nodes.size();
|
||||||
|
|
Loading…
Reference in a new issue