[
https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068950#comment-16068950
]
ASF GitHub Bot commented on ZOOKEEPER-2825:
-------------------------------------------
Github user afine commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/297#discussion_r124907017
--- Diff:
src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java ---
@@ -590,18 +590,15 @@ public boolean
clientTunneledAuthenticationInProgress() {
// authentication is either in progress, successful, or
failed.
// 1. Authentication hasn't finished yet: we must wait for
it to do so.
- if ((isComplete() == false) &&
- (isFailed() == false)) {
+ if (!isComplete() && !isFailed()) {
return true;
}
// 2. SASL authentication has succeeded or failed..
- if (isComplete() || isFailed()) {
- if (gotLastPacket == false) {
- // ..but still in progress, because there is a
final SASL
- // message from server which must be received.
+ if (!gotLastPacket) {
--- End diff --
this appears to be a logic change. Was that intended?
> 1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for
> more readable; 3. Standardize `StringBuilder#append` usage for CLIENT module
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-2825
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2825
> Project: ZooKeeper
> Issue Type: Improvement
> Components: java client
> Affects Versions: 3.5.3
> Reporter: Benedict Jin
> Assignee: Benedict Jin
> Priority: Minor
> Labels: refactoring
> Fix For: 3.5.4, 3.6.0
>
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> * Remove unncessnary import;
> * `contains` instead of `indexOf > -1` for more readable;
> * Standardize `StringBuilder#append` usage for CLIENT module
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)