File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
azure-cosmos-tests/src/test/java/com/azure/cosmos
azure-cosmos/src/main/java/com/azure/cosmos/implementation Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,13 @@ public void usingMultipleWriteRegions() {
4848 public void connectionPolicyDirectConnectionToString () {
4949 ConnectionPolicy policy = new ConnectionPolicy (DirectConnectionConfig .getDefaultConfig ());
5050 assertThat (policy .toString ()).isNotEmpty ();
51+ assertThat (policy .toString ()).isNotEqualTo ("null" );
5152 }
5253
5354 @ Test (groups = { "unit" })
5455 public void connectionPolicyGatewayConnectionToString () {
5556 ConnectionPolicy policy = new ConnectionPolicy (GatewayConnectionConfig .getDefaultConfig ());
5657 assertThat (policy .toString ()).isNotEmpty ();
58+ assertThat (policy .toString ()).isNotEqualTo ("null" );
5759 }
5860}
Original file line number Diff line number Diff line change 1414import java .time .Duration ;
1515import java .util .Collections ;
1616import java .util .List ;
17+ import java .util .Objects ;
1718import java .util .function .Supplier ;
1819
1920/**
@@ -669,7 +670,7 @@ public String toString() {
669670 ", minConnectionPoolSizePerEndpoint=" + minConnectionPoolSizePerEndpoint +
670671 ", openConnectionsConcurrency=" + openConnectionsConcurrency +
671672 ", aggressiveWarmupConcurrency=" + aggressiveWarmupConcurrency +
672- ", pendingAcquireMaxCount=" + this . pendingAcquireMaxCount != null ? String . valueOf (this .pendingAcquireMaxCount ) : "DEFAULT" +
673+ ", pendingAcquireMaxCount=" + Objects . toString (this .pendingAcquireMaxCount , "DEFAULT" ) +
673674 '}' ;
674675 }
675676}
You can’t perform that action at this time.
0 commit comments