Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#### Breaking Changes

#### Bugs Fixed
Fixing an NPE caused due to boxed Boolean conversion. - See [PR 48656](https://github.com/Azure/azure-sdk-for-java/pull/48656/)
Comment thread
mbhaskar marked this conversation as resolved.

#### Other Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,19 +302,19 @@ public Boolean isPerPartitionFailoverBehaviorEnabled() {

/**
* Returns true if the account supports N region synchronous commit,
* false if enableNRegionSynchronousCommit evaluates to null or false.
* false otherwise
* <p>
* If enableNRegionSynchronousCommit property does not exist in account metadata JSON payload, null is returned.
* If enableNRegionSynchronousCommit property does not exist in account metadata JSON payload, false is returned
*
* @return true if the account supports N region synchronous commit, false otherwise.
*/
public Boolean isNRegionSynchronousCommitEnabled() {
public boolean isNRegionSynchronousCommitEnabled() {

if (super.has(Constants.Properties.ENABLE_N_REGION_SYNCHRONOUS_COMMIT)) {
return ObjectUtils.defaultIfNull(super.getBoolean(Constants.Properties.ENABLE_N_REGION_SYNCHRONOUS_COMMIT), false);
}

return null;
return false;
}
Comment thread
mbhaskar marked this conversation as resolved.

public void setIsPerPartitionFailoverBehaviorEnabled(boolean value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public boolean getNRegionSynchronousCommitEnabled() {
return nRegionSynchronousCommitEnabled;
}

public void setNRegionSynchronousCommitEnabled(Boolean nRegionSynchronousCommitEnabled) {
public void setNRegionSynchronousCommitEnabled(boolean nRegionSynchronousCommitEnabled) {
this.nRegionSynchronousCommitEnabled = nRegionSynchronousCommitEnabled;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,11 @@ public void setPerPartitionAutomaticFailoverConfigModifier(Consumer<DatabaseAcco
this.perPartitionAutomaticFailoverConfigModifier = perPartitionAutomaticFailoverConfigModifier;
}

public Boolean getNRegionSynchronousCommitEnabled() {
public boolean getNRegionSynchronousCommitEnabled() {
this.databaseAccountReadLock.lock();
try {
if (this.latestDatabaseAccount == null) {
return null;
return false;
}
return this.latestDatabaseAccount.isNRegionSynchronousCommitEnabled();
Comment thread
mbhaskar marked this conversation as resolved.
} finally {
Expand Down