You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/24 18:07:02 UTC
[GitHub] [calcite-avatica] julianhyde edited a comment on issue #89:
[CALCITE-2945] Use Boolean#equals in Boolean object compare
julianhyde edited a comment on issue #89: [CALCITE-2945] Use Boolean#equals in Boolean object compare
URL: https://github.com/apache/calcite-avatica/pull/89#issuecomment-475984184
What about if that.readOnly is not null, but this.readOnly is null? The new code will throw NPE.
I suggest
```if (that.readOnly != null && !Objects.equals(this.readOnly, that.readOnly))```
The same bug exists in `autoCommit`.
We should use the same pattern in `transactionIsolation`, even though it doesn't have the bug.
In the test, please fix indentation, and use `assertThat( ... is())` rather than `assertEquals`, and add a test case for the NPE I mentioned above.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services