Discussion:
[jira] [Created] (ZOOKEEPER-2825) 1. Remove unncessnary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI module
(too old to reply)
Benedict Jin (JIRA)
2017-06-29 01:25:00 UTC
Permalink
Benedict Jin created ZOOKEEPER-2825:
---------------------------------------

Summary: 1. Remove unncessnary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI 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
Fix For: 3.5.4, 3.6.0


* Remove unncessnary import;
* `contains` instead of `indexOf > -1` for more readable;
* Standardize `StringBuilder#append` usage for CLI module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
ASF GitHub Bot (JIRA)
2017-06-29 01:28:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067558#comment-16067558 ]

ASF GitHub Bot commented on ZOOKEEPER-2825:
-------------------------------------------

GitHub user asdf2014 opened a pull request:

https://github.com/apache/zookeeper/pull/297

ZOOKEEPER-2825: 1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI module

* Remove unnecessary import;
* `contains` instead of `indexOf > -1` for more readable;
* Standardize `StringBuilder#append` usage for CLI module

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/asdf2014/zookeeper ZOOKEEPER-2825

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/297.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #297

----
commit 91ef299ae58dc22b5954a24a6f2ecba1b7b7c3f2
Author: asdf2014 <***@qq.com>
Date: 2017-06-29T01:25:23Z

1. Remove unncessnary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI module

----
Post by Benedict Jin (JIRA)
1. Remove unncessnary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI 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
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 CLI module
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Benedict Jin (JIRA)
2017-06-29 01:28:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benedict Jin updated ZOOKEEPER-2825:
------------------------------------
Summary: 1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI module (was: 1. Remove unncessnary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI module)
Post by ASF GitHub Bot (JIRA)
1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI 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
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 CLI module
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Hadoop QA (JIRA)
2017-06-29 01:43:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067567#comment-16067567 ]

Hadoop QA commented on ZOOKEEPER-2825:
--------------------------------------

-1 overall. GitHub Pull Request Build


+1 @author. The patch does not contain any @author tags.

+0 tests included. The patch appears to be a documentation patch that doesn't require tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

-1 core tests. The patch failed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/834//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/834//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/834//console

This message is automatically generated.
Post by ASF GitHub Bot (JIRA)
1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI 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
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 CLI module
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Benedict Jin (JIRA)
2017-06-29 01:44:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benedict Jin updated ZOOKEEPER-2825:
------------------------------------
Summary: 1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLIENT module (was: 1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLI module)
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
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 CLI module
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Benedict Jin (JIRA)
2017-06-29 01:44:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benedict Jin updated ZOOKEEPER-2825:
------------------------------------
Description:
* Remove unncessnary import;
* `contains` instead of `indexOf > -1` for more readable;
* Standardize `StringBuilder#append` usage for CLIENT module

was:
* Remove unncessnary import;
* `contains` instead of `indexOf > -1` for more readable;
* Standardize `StringBuilder#append` usage for CLI module
Post by Benedict Jin (JIRA)
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
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)
Hadoop QA (JIRA)
2017-06-29 01:46:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067574#comment-16067574 ]

Hadoop QA commented on ZOOKEEPER-2825:
--------------------------------------

+1 overall. GitHub Pull Request Build


+1 @author. The patch does not contain any @author tags.

+0 tests included. The patch appears to be a documentation patch that doesn't require tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/833//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/833//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/833//console

This message is automatically generated.
Post by Benedict Jin (JIRA)
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
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)
Hadoop QA (JIRA)
2017-06-29 02:07:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067591#comment-16067591 ]

Hadoop QA commented on ZOOKEEPER-2825:
--------------------------------------

+1 overall. GitHub Pull Request Build


+1 @author. The patch does not contain any @author tags.

+0 tests included. The patch appears to be a documentation patch that doesn't require tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/835//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/835//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/835//console

This message is automatically generated.
Post by Benedict Jin (JIRA)
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
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)
ASF GitHub Bot (JIRA)
2017-06-29 04:30:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067718#comment-16067718 ]

ASF GitHub Bot commented on ZOOKEEPER-2825:
-------------------------------------------

Github user shralex commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/297#discussion_r124709964

--- Diff: src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java ---
@@ -590,14 +590,13 @@ 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()) {
--- End diff --

wouldn't this always be true because of the previous if condition ?
Post by Benedict Jin (JIRA)
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
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)
Alexander Shraer (JIRA)
2017-06-29 04:33:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067724#comment-16067724 ]

Alexander Shraer commented on ZOOKEEPER-2825:
---------------------------------------------

Priority 'Major' seems too much for this...
Post by Benedict Jin (JIRA)
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
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)
Michael Han (JIRA)
2017-06-29 05:01:07 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Han updated ZOOKEEPER-2825:
-----------------------------------
Priority: Minor (was: Major)
Post by Benedict Jin (JIRA)
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
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)
Michael Han (JIRA)
2017-06-29 05:02:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Han updated ZOOKEEPER-2825:
-----------------------------------
Labels: refactoring (was: )
Post by Benedict Jin (JIRA)
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)
Benedict Jin (JIRA)
2017-06-29 06:23:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067827#comment-16067827 ]

Benedict Jin commented on ZOOKEEPER-2825:
-----------------------------------------

Hi, [~shralex]. You are right, thank you for modifying priority into a reasonable level.
Post by Benedict Jin (JIRA)
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)
ASF GitHub Bot (JIRA)
2017-06-29 06:33:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067837#comment-16067837 ]

ASF GitHub Bot commented on ZOOKEEPER-2825:
-------------------------------------------

Github user asdf2014 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/297#discussion_r124721264

--- Diff: src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java ---
@@ -590,14 +590,13 @@ 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()) {
--- End diff --
Post by Benedict Jin (JIRA)
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)
Hadoop QA (JIRA)
2017-06-29 06:57:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067863#comment-16067863 ]

Hadoop QA commented on ZOOKEEPER-2825:
--------------------------------------

-1 overall. GitHub Pull Request Build


+1 @author. The patch does not contain any @author tags.

+0 tests included. The patch appears to be a documentation patch that doesn't require tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

-1 core tests. The patch failed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/841//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/841//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/841//console

This message is automatically generated.
Post by Benedict Jin (JIRA)
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)
Hadoop QA (JIRA)
2017-06-29 08:35:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068002#comment-16068002 ]

Hadoop QA commented on ZOOKEEPER-2825:
--------------------------------------

+1 overall. GitHub Pull Request Build


+1 @author. The patch does not contain any @author tags.

+0 tests included. The patch appears to be a documentation patch that doesn't require tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/842//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/842//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/842//console

This message is automatically generated.
Post by Benedict Jin (JIRA)
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)
ASF GitHub Bot (JIRA)
2017-06-29 09:50:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068086#comment-16068086 ]

ASF GitHub Bot commented on ZOOKEEPER-2825:
-------------------------------------------

Github user asdf2014 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/297#discussion_r124757125

--- Diff: src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java ---
@@ -590,14 +590,13 @@ 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()) {
--- End diff --

Maybe i understand what you mean, if **`not_complete && not_failed`** (Line: 593) is `FALSE` means **`complete || non_failed`** and **`complete || failed`** and **`non_complete || failed`** is `TRUE`, then the `isComplete() || isFailed()` (Line: 599) will always be `TRUE`.
Post by Benedict Jin (JIRA)
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)
Hadoop QA (JIRA)
2017-06-29 10:12:02 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068110#comment-16068110 ]

Hadoop QA commented on ZOOKEEPER-2825:
--------------------------------------

+1 overall. GitHub Pull Request Build


+1 @author. The patch does not contain any @author tags.

+0 tests included. The patch appears to be a documentation patch that doesn't require tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/843//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/843//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/843//console

This message is automatically generated.
Post by Benedict Jin (JIRA)
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)
ASF GitHub Bot (JIRA)
2017-06-29 14:11:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068390#comment-16068390 ]

ASF GitHub Bot commented on ZOOKEEPER-2825:
-------------------------------------------

Github user shralex commented on the issue:

https://github.com/apache/zookeeper/pull/297

LGTM
Post by Benedict Jin (JIRA)
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)
ASF GitHub Bot (JIRA)
2017-06-29 20:40:00 UTC
Permalink
[ 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?
Post by Benedict Jin (JIRA)
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)
ASF GitHub Bot (JIRA)
2017-06-29 20:41:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068954#comment-16068954 ]

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_r124907405

--- 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 --

nvm, did not see the code above. lgtm
Post by Benedict Jin (JIRA)
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)

Loading...