File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
src/main/java/com/azure/cosmos/implementation Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 77#### Breaking Changes
88
99#### Bugs Fixed
10+ Fixing an NPE caused due to boxed Boolean conversion. - See [ PR 48656] ( https://github.com/Azure/azure-sdk-for-java/pull/48656/ )
1011
1112#### Other Changes
1213
Original file line number Diff line number Diff line change @@ -302,19 +302,19 @@ public Boolean isPerPartitionFailoverBehaviorEnabled() {
302302
303303 /**
304304 * Returns true if the account supports N region synchronous commit,
305- * false if enableNRegionSynchronousCommit evaluates to null or false.
305+ * false otherwise
306306 * <p>
307- * If enableNRegionSynchronousCommit property does not exist in account metadata JSON payload, null is returned.
307+ * If enableNRegionSynchronousCommit property does not exist in account metadata JSON payload, false is returned
308308 *
309309 * @return true if the account supports N region synchronous commit, false otherwise.
310310 */
311- public Boolean isNRegionSynchronousCommitEnabled () {
311+ public boolean isNRegionSynchronousCommitEnabled () {
312312
313313 if (super .has (Constants .Properties .ENABLE_N_REGION_SYNCHRONOUS_COMMIT )) {
314314 return ObjectUtils .defaultIfNull (super .getBoolean (Constants .Properties .ENABLE_N_REGION_SYNCHRONOUS_COMMIT ), false );
315315 }
316316
317- return null ;
317+ return false ;
318318 }
319319
320320 public void setIsPerPartitionFailoverBehaviorEnabled (boolean value ) {
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ public boolean getNRegionSynchronousCommitEnabled() {
275275 return nRegionSynchronousCommitEnabled ;
276276 }
277277
278- public void setNRegionSynchronousCommitEnabled (Boolean nRegionSynchronousCommitEnabled ) {
278+ public void setNRegionSynchronousCommitEnabled (boolean nRegionSynchronousCommitEnabled ) {
279279 this .nRegionSynchronousCommitEnabled = nRegionSynchronousCommitEnabled ;
280280 }
281281
Original file line number Diff line number Diff line change @@ -438,11 +438,11 @@ public void setPerPartitionAutomaticFailoverConfigModifier(Consumer<DatabaseAcco
438438 this .perPartitionAutomaticFailoverConfigModifier = perPartitionAutomaticFailoverConfigModifier ;
439439 }
440440
441- public Boolean getNRegionSynchronousCommitEnabled () {
441+ public boolean getNRegionSynchronousCommitEnabled () {
442442 this .databaseAccountReadLock .lock ();
443443 try {
444444 if (this .latestDatabaseAccount == null ) {
445- return null ;
445+ return false ;
446446 }
447447 return this .latestDatabaseAccount .isNRegionSynchronousCommitEnabled ();
448448 } finally {
You can’t perform that action at this time.
0 commit comments