danny0405 commented on a change in pull request #89: [CALCITE-2945] Use
Boolean#equals in Boolean object compare
URL: https://github.com/apache/calcite-avatica/pull/89#discussion_r268393778
##########
File path:
core/src/main/java/org/apache/calcite/avatica/ConnectionPropertiesImpl.java
##########
@@ -94,11 +94,11 @@ public boolean isDirty() {
if (this == that) {
return this;
}
- if (that.isAutoCommit() != null && this.autoCommit != that.isAutoCommit())
{
+ if (that.isAutoCommit() != null &&
!this.autoCommit.equals(that.isAutoCommit())) {
this.autoCommit = that.isAutoCommit();
this.isDirty = true;
}
- if (that.isReadOnly() != null && this.readOnly != that.isReadOnly()) {
+ if (that.isReadOnly() != null && !this.readOnly.equals(that.isReadOnly()))
{
Review comment:
+1, nice catch.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services