Преглед на файлове

ZOOKEEPER-3409: Compile Java code with -Xdoclint

Add -Xdoclint option and clean up Javadocs

Author: Enrico Olivelli <eolivelli@apache.org>

Reviewers: Norbert Kalmar <nkalmar@apache.org>

Closes #965 from eolivelli/fix/xdoclint
Enrico Olivelli преди 6 години
родител
ревизия
0d41fe80cd
променени са 73 файла, в които са добавени 133 реда и са изтрити 173 реда
  1. 1 0
      pom.xml
  2. 0 1
      zookeeper-recipes/zookeeper-recipes-election/src/main/java/org/apache/zookeeper/recipes/leader/LeaderElectionSupport.java
  3. 2 2
      zookeeper-recipes/zookeeper-recipes-lock/src/main/java/org/apache/zookeeper/recipes/lock/WriteLock.java
  4. 15 15
      zookeeper-server/src/main/java/org/apache/zookeeper/AsyncCallback.java
  5. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
  6. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocketNIO.java
  7. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocketNetty.java
  8. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/Shell.java
  9. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
  10. 2 4
      zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java
  11. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/common/PathTrie.java
  12. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/common/StringUtils.java
  13. 3 3
      zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Exception.java
  14. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/jmx/ManagedUtil.java
  15. 0 2
      zookeeper-server/src/main/java/org/apache/zookeeper/metrics/MetricsContext.java
  16. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/metrics/MetricsProvider.java
  17. 0 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ClientCnxnLimitException.java
  18. 3 3
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ContainerManager.java
  19. 0 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/DataNode.java
  20. 0 3
      zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java
  21. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/EphemeralType.java
  22. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/EphemeralTypeEmulate353.java
  23. 1 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ExpiryQueue.java
  24. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java
  25. 0 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerConfig.java
  26. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java
  27. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/WorkerService.java
  28. 3 5
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
  29. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Command.java
  30. 6 6
      zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java
  31. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/JettyAdminServer.java
  32. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/auth/DigestAuthenticationProvider.java
  33. 1 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/auth/KerberosName.java
  34. 10 10
      zookeeper-server/src/main/java/org/apache/zookeeper/server/auth/X509AuthenticationProvider.java
  35. 1 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FilePadding.java
  36. 1 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnLog.java
  37. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java
  38. 0 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/FastLeaderElection.java
  39. 1 3
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/FollowerZooKeeperServer.java
  40. 2 3
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java
  41. 2 4
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java
  42. 2 3
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java
  43. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java
  44. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
  45. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumMXBean.java
  46. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java
  47. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/IWatchManager.java
  48. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/RemoveWatchesTest.java
  49. 2 2
      zookeeper-server/src/test/java/org/apache/zookeeper/ZKParameterized.java
  50. 4 4
      zookeeper-server/src/test/java/org/apache/zookeeper/common/TimeTest.java
  51. 2 2
      zookeeper-server/src/test/java/org/apache/zookeeper/server/EphemeralTypeTest.java
  52. 2 2
      zookeeper-server/src/test/java/org/apache/zookeeper/server/MockServerCnxn.java
  53. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/server/ZooKeeperServerMainTest.java
  54. 3 3
      zookeeper-server/src/test/java/org/apache/zookeeper/server/ZooKeeperServerStartupTest.java
  55. 2 5
      zookeeper-server/src/test/java/org/apache/zookeeper/server/admin/CommandsTest.java
  56. 3 3
      zookeeper-server/src/test/java/org/apache/zookeeper/server/persistence/FileTxnSnapLogTest.java
  57. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/FLEBackwardElectionRoundTest.java
  58. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/LearnerHandlerTest.java
  59. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigBackupTest.java
  60. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigLegacyTest.java
  61. 2 2
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/StandaloneDisabledTest.java
  62. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/Zab1_0Test.java
  63. 8 8
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/auth/QuorumAuthUpgradeTest.java
  64. 4 4
      zookeeper-server/src/test/java/org/apache/zookeeper/server/util/PortForwarder.java
  65. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/test/AsyncOps.java
  66. 3 3
      zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientSSLTest.java
  67. 0 1
      zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientTest.java
  68. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/test/CnxManagerTest.java
  69. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java
  70. 3 3
      zookeeper-server/src/test/java/org/apache/zookeeper/test/JMXEnv.java
  71. 2 2
      zookeeper-server/src/test/java/org/apache/zookeeper/test/SSLAuthTest.java
  72. 0 3
      zookeeper-server/src/test/java/org/apache/zookeeper/test/TestHammer.java
  73. 2 2
      zookeeper-server/src/test/java/org/apache/zookeeper/test/X509AuthTest.java

+ 1 - 0
pom.xml

@@ -476,6 +476,7 @@
                <compilerArg>-Werror</compilerArg>
                <compilerArg>-Xlint:deprecation</compilerArg>
                <compilerArg>-Xlint:unchecked</compilerArg>
+               <compilerArg>-Xdoclint</compilerArg>
                <!-- https://issues.apache.org/jira/browse/MCOMPILER-205 -->
                <compilerArg>-Xpkginfo:always</compilerArg>
               </compilerArgs>

+ 0 - 1
zookeeper-recipes/zookeeper-recipes-election/src/main/java/org/apache/zookeeper/recipes/leader/LeaderElectionSupport.java

@@ -91,7 +91,6 @@ import org.slf4j.LoggerFactory;
  * the entire process and thus the connection to ZK and the leader offer
  * resulting in another round of leader determination.</li>
  * </ul>
- * </p>
  */
 public class LeaderElectionSupport implements Watcher {
 

+ 2 - 2
zookeeper-recipes/zookeeper-recipes-lock/src/main/java/org/apache/zookeeper/recipes/lock/WriteLock.java

@@ -34,9 +34,9 @@ import java.util.TreeSet;
 
 /**
  * A <a href="package.html">protocol to implement an exclusive
- *  write lock or to elect a leader</a>. <p/> You invoke {@link #lock()} to 
+ *  write lock or to elect a leader</a>. <p> You invoke {@link #lock()} to 
  *  start the process of grabbing the lock; you may get the lock then or it may be 
- *  some time later. <p/> You can register a listener so that you are invoked 
+ *  some time later. <p> You can register a listener so that you are invoked 
  *  when you get the lock; otherwise you can ask if you have the lock
  *  by calling {@link #isOwner()}
  *

+ 15 - 15
zookeeper-server/src/main/java/org/apache/zookeeper/AsyncCallback.java

@@ -27,7 +27,7 @@ import org.apache.zookeeper.data.Stat;
  * Interface definitions of asynchronous callbacks.
  * An asynchronous callback is deferred to invoke after a function returns.
  * Asynchronous calls usually improve system efficiency on IO-related APIs.
- * <p/>
+ * <p>
  * ZooKeeper provides asynchronous version as equivalent to synchronous APIs.
  */
 @InterfaceAudience.Public
@@ -40,10 +40,10 @@ public interface AsyncCallback {
     interface StatCallback extends AsyncCallback {
         /**
          * Process the result of the asynchronous call.
-         * <p/>
+         * <p>
          * On success, rc is
          * {@link org.apache.zookeeper.KeeperException.Code#OK}.
-         * <p/>
+         * <p>
          * On failure, rc is set to the corresponding failure code in
          * {@link org.apache.zookeeper.KeeperException}.
          * <ul>
@@ -89,10 +89,10 @@ public interface AsyncCallback {
     interface DataCallback extends AsyncCallback {
         /**
          * Process the result of asynchronous calls.
-         * <p/>
+         * <p>
          * On success, rc is
          * {@link org.apache.zookeeper.KeeperException.Code#OK}.
-         * <p/>
+         * <p>
          * On failure, rc is set to the corresponding failure code in
          * {@link org.apache.zookeeper.KeeperException}.
          * <ul>
@@ -122,10 +122,10 @@ public interface AsyncCallback {
     interface ACLCallback extends AsyncCallback {
         /**
          * Process the result of the asynchronous call.
-         * <p/>
+         * <p>
          * On success, rc is
          * {@link org.apache.zookeeper.KeeperException.Code#OK}.
-         * <p/>
+         * <p>
          * On failure, rc is set to the corresponding failure code in
          * {@link org.apache.zookeeper.KeeperException}.
          * <ul>
@@ -155,10 +155,10 @@ public interface AsyncCallback {
     interface ChildrenCallback extends AsyncCallback {
         /**
          * Process the result of the asynchronous call.
-         * <p/>
+         * <p>
          * On success, rc is
          * {@link org.apache.zookeeper.KeeperException.Code#OK}.
-         * <p/>
+         * <p>
          * On failure, rc is set to the corresponding failure code in
          * {@link org.apache.zookeeper.KeeperException}.
          * <ul>
@@ -231,10 +231,10 @@ public interface AsyncCallback {
     interface StringCallback extends AsyncCallback {
         /**
          * Process the result of the asynchronous call.
-         * <p/>
+         * <p>
          * On success, rc is
          * {@link org.apache.zookeeper.KeeperException.Code#OK}.
-         * <p/>
+         * <p>
          * On failure, rc is set to the corresponding failure code in
          * {@link org.apache.zookeeper.KeeperException}.
          * <ul>
@@ -275,10 +275,10 @@ public interface AsyncCallback {
     interface VoidCallback extends AsyncCallback {
         /**
          * Process the result of the asynchronous call.
-         * <p/>
+         * <p>
          * On success, rc is
          * {@link org.apache.zookeeper.KeeperException.Code#OK}.
-         * <p/>
+         * <p>
          * On failure, rc is set to the corresponding failure code in
          * {@link org.apache.zookeeper.KeeperException}.
          * <ul>
@@ -317,13 +317,13 @@ public interface AsyncCallback {
     interface MultiCallback extends AsyncCallback {
         /**
          * Process the result of the asynchronous call.
-         * <p/>
+         * <p>
          * On success, rc is
          * {@link org.apache.zookeeper.KeeperException.Code#OK}.
          * All opResults are
          * non-{@link org.apache.zookeeper.OpResult.ErrorResult},
          *
-         * <p/>
+         * <p>
          * On failure, rc is a failure code in
          * {@link org.apache.zookeeper.KeeperException.Code}.
          * Either opResults is null, or all opResults are

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java

@@ -387,7 +387,6 @@ public class ClientCnxn {
      * @param canBeReadOnly
      *                whether the connection is allowed to go to read-only
      *                mode in case of partitioning
-     * @throws IOException
      */
     public ClientCnxn(String chrootPath, HostProvider hostProvider, int sessionTimeout, ZooKeeper zooKeeper,
             ClientWatchManager watcher, ClientCnxnSocket clientCnxnSocket,

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocketNIO.java

@@ -61,7 +61,6 @@ public class ClientCnxnSocketNIO extends ClientCnxnSocket {
     }
     
     /**
-     * @return true if a packet was received
      * @throws InterruptedException
      * @throws IOException
      */

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocketNetty.java

@@ -92,7 +92,7 @@ public class ClientCnxnSocketNetty extends ClientCnxnSocket {
 
     /**
      * lifecycles diagram:
-     * <p/>
+     * <p>
      * loop:
      * - try:
      * - - !isConnected()
@@ -101,7 +101,7 @@ public class ClientCnxnSocketNetty extends ClientCnxnSocket {
      * - catch:
      * - - cleanup()
      * close()
-     * <p/>
+     * <p>
      * Other non-lifecycle methods are in jeopardy getting a null channel
      * when calling in concurrency. We must handle it.
      */

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/Shell.java

@@ -253,7 +253,7 @@ abstract public class Shell {
     }
   }
 
-  /** return an array containing the command name & its parameters */ 
+  /** return an array containing the command name and its parameters */ 
   protected abstract String[] getExecString();
   
   /** Parse the execution result */

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java

@@ -41,7 +41,6 @@ public class ZKUtil {
      * If there is an error with deleting one of the sub-nodes in the tree,
      * this operation would abort and would be the responsibility of the app to handle the same.
      *
-     * See {@link #delete(String, int)} for more details.
      *
      * @throws IllegalArgumentException if an invalid path is specified
      */

+ 2 - 4
zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java

@@ -256,7 +256,7 @@ public class ZooKeeper implements AutoCloseable {
     }
 
     /**
-     * Manage watchers & handle events generated by the ClientCnxn object.
+     * Manage watchers and handle events generated by the ClientCnxn object.
      *
      * We are implementing this as a nested class of ZooKeeper so that
      * the public methods will not be exposed as part of the ZooKeeper client
@@ -2784,8 +2784,6 @@ public class ZooKeeper implements AutoCloseable {
      *
      * @since 3.6.0
      * @param path
-     * @throws KeeperException
-     * @throws InterruptedException
      */
     public void getAllChildrenNumber(final String path, AsyncCallback.AllChildrenNumberCallback cb, Object ctx) {
 
@@ -3155,7 +3153,7 @@ public class ZooKeeper implements AutoCloseable {
      * 
      * @param acl
      *            ACL list
-     * @throws InvalidACLException
+     * @throws KeeperException.InvalidACLException
      *             if ACL list is not valid
      */
     private void validateACL(List<ACL> acl) throws KeeperException.InvalidACLException {

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/common/PathTrie.java

@@ -157,7 +157,6 @@ public class PathTrie {
         /**
          * get the list of children of this 
          * trienode.
-         * @param node to get its children
          * @return the string list of its children
          */
         String[] getChildren() {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/common/StringUtils.java

@@ -25,7 +25,7 @@ public class StringUtils {
     private StringUtils() {/** non instantiable and non inheritable **/}
 
     /**
-     * This method returns an immutable List<String>, but different from String's split()
+     * This method returns an immutable List&lt;String&gt;, but different from String's split()
      * it trims the results in the input String, and removes any empty string from
      * the resulting List.
      *
@@ -43,7 +43,7 @@ public class StringUtils {
     }
     
     /**
-     * This method takes a List<String> and a delimiter and joins the strings
+     * This method takes a List&lt;String&gt; and a delimiter and joins the strings
      * into a single string, where the original strings are separated using 
      * the given delimiter.
      *

+ 3 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Exception.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/jmx/ManagedUtil.java

@@ -57,7 +57,7 @@ public class ManagedUtil {
     /**
      * Register the log4j JMX mbeans. Set environment variable
      * "zookeeper.jmx.log4j.disable" to true to disable registration.
-     * @see http://logging.apache.org/log4j/1.2/apidocs/index.html?org/apache/log4j/jmx/package-summary.html
+     * See http://logging.apache.org/log4j/1.2/apidocs/index.html?org/apache/log4j/jmx/package-summary.html
      * @throws JMException if registration fails
      */
     @SuppressWarnings("rawtypes")

+ 0 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/metrics/MetricsContext.java

@@ -80,7 +80,6 @@ public interface MetricsContext {
      * @param name
      * @param detailLevel
      * @return the summary identified by name in this context.
-     * @see #getSummary(java.lang.String)
      */
     Summary getSummary(String name, DetailLevel detailLevel);
 
@@ -90,7 +89,6 @@ public interface MetricsContext {
      * @param name
      * @param detailLevel
      * @return the summary identified by name in this context.
-     * @see #getSummary(java.lang.String)
      */
     SummarySet getSummarySet(String name, DetailLevel detailLevel);
 

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/metrics/MetricsProvider.java

@@ -25,7 +25,7 @@ import java.util.function.BiConsumer;
  * A MetricsProvider is a system which collects Metrics and publishes current values to external facilities.
  *
  * The system will create an instance of the configured class using the default constructor, which must be public.<br>
- * After the instantiation of the provider, the system will call {@link #configure(java.util.Map) } in order to provide configuration,
+ * After the instantiation of the provider, the system will call {@link #configure(java.util.Properties) } in order to provide configuration,
  * and then when the system is ready to work it will call {@link #start() }.
  * <br>
  * Providers can be used both on ZooKeeper servers and on ZooKeeper clients.

+ 0 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/ClientCnxnLimitException.java

@@ -20,8 +20,6 @@ package org.apache.zookeeper.server;
 
 /**
  * Indicates that the number of client connections has exceeded some limit.
- * @see org.apache.zookeeper.server.ClientCnxnLimit#checkLimit()
- * @see org.apache.zookeeper.server.ClientCnxnLimit#checkLimit(int)
  */
 public class ClientCnxnLimitException extends Exception {
     public ClientCnxnLimitException() {

+ 3 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/server/ContainerManager.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,7 +32,7 @@ import java.util.concurrent.atomic.AtomicReference;
  * Manages cleanup of container ZNodes. This class is meant to only
  * be run from the leader. There's no harm in running from followers/observers
  * but that will be extra work that's not needed. Once started, it periodically
- * checks container nodes that have a cversion > 0 and have no children. A
+ * checks container nodes that have a cversion &gt; 0 and have no children. A
  * delete is attempted on the node. The result of the delete is unimportant.
  * If the proposal fails or the container node is not empty there's no harm.
  */

+ 0 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/DataNode.java

@@ -71,8 +71,6 @@ public class DataNode implements Record {
     /**
      * create a DataNode with parent, data, acls and stat
      * 
-     * @param parent
-     *            the parent of this DataNode
      * @param data
      *            the data to be set
      * @param acl

+ 0 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java

@@ -403,7 +403,6 @@ public class DataTree {
      * @param time
      * @throws NodeExistsException
      * @throws NoNodeException
-     * @throws KeeperException
      */
     public void createNode(final String path, byte data[], List<ACL> acl,
             long ephemeralOwner, int parentCVersion, long zxid, long time)
@@ -429,7 +428,6 @@ public class DataTree {
      * 			  A Stat object to store Stat output results into.
      * @throws NodeExistsException
      * @throws NoNodeException
-     * @throws KeeperException
      */
     public void createNode(final String path, byte data[], List<ACL> acl,
             long ephemeralOwner, int parentCVersion, long zxid, long time, Stat outputStat)
@@ -1223,7 +1221,6 @@ public class DataTree {
      * @param path
      *            a string builder.
      * @throws IOException
-     * @throws InterruptedException
      */
     void serializeNode(OutputArchive oa, StringBuilder path) throws IOException {
         String pathString = path.toString();

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/EphemeralType.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/EphemeralTypeEmulate353.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ 1 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/ExpiryQueue.java

@@ -21,7 +21,6 @@ package org.apache.zookeeper.server;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Date;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
@@ -181,7 +180,7 @@ public class ExpiryQueue<E> {
     }
 
     /**
-     * Returns an unmodifiable view of the expiration time -> elements mapping.
+     * Returns an unmodifiable view of the expiration time -&gt; elements mapping.
      */
     public Map<Long, Set<E>> getExpiryMap() {
         return Collections.unmodifiableMap(expiryMap);

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java

@@ -382,7 +382,6 @@ public abstract class ServerCnxn implements Stats, Watcher {
     /**
      * Print information about the connection.
      * @param brief iff true prints brief details, otw full detail
-     * @return information about this connection
      */
     public synchronized void
     dumpConnectionInfo(PrintWriter pwriter, boolean brief) {

+ 0 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerConfig.java

@@ -68,7 +68,6 @@ public class ServerConfig {
     /**
      * Parse arguments for server configuration
      * @param args clientPort dataDir and optional tickTime and maxClientCnxns
-     * @return ServerConfig configured wrt arguments
      * @throws IllegalArgumentException on invalid usage
      */
     public void parse(String[] args) {
@@ -90,7 +89,6 @@ public class ServerConfig {
     /**
      * Parse a ZooKeeper configuration file
      * @param path the patch of the configuration file
-     * @return ServerConfig configured wrt arguments
      * @throws ConfigException error processing configuration
      */
     public void parse(String path) throws ConfigException {

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java

@@ -123,7 +123,7 @@ public class SyncRequestProcessor extends ZooKeeperCriticalThread implements
         return 0;
     }
 
-    /** If both flushDelay and maxMaxBatchSize are set (> 0), flush
+    /** If both flushDelay and maxMaxBatchSize are set (bigger than 0), flush
      * whenever either condition is hit. If only one or the other is
      * set, flush only when the relevant condition is hit.
      */

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/WorkerService.java

@@ -59,7 +59,7 @@ public class WorkerService {
     private volatile boolean stopped = true;
 
     /**
-     * @param name                  worker threads are named <name>Thread-##
+     * @param name                  worker threads are named &lt;name&gt;Thread-##
      * @param numThreads            number of worker threads (0 - N)
      *                              If 0, scheduled work is run immediately by
      *                              the calling thread.

+ 3 - 5
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java

@@ -80,7 +80,7 @@ import org.slf4j.LoggerFactory;
 /**
  * This class implements a simple standalone ZooKeeperServer. It sets up the
  * following chain of RequestProcessors to process requests:
- * PrepRequestProcessor -> SyncRequestProcessor -> FinalRequestProcessor
+ * PrepRequestProcessor -&gt; SyncRequestProcessor -&gt; FinalRequestProcessor
  */
 public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
     protected static final Logger LOG;
@@ -193,7 +193,6 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
      * methods to prepare the instance (eg datadir, datalogdir, ticktime,
      * builder, etc...)
      *
-     * @throws IOException
      */
     public ZooKeeperServer() {
         listener = new ZooKeeperServerListenerImpl(this);
@@ -204,7 +203,6 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
      * Creates a ZooKeeperServer instance. It sets everything up, but doesn't
      * actually start listening for clients until run() is invoked.
      *
-     * @param dataDir the directory to put the data
      */
     public ZooKeeperServer(FileTxnSnapLog txnLogFactory, int tickTime,
             int minSessionTimeout, int maxSessionTimeout, int clientPortListenBacklog,
@@ -607,7 +605,7 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
      * the server state change to a registered shutdown handler, if any.
      * <p>
      * The following are the server state transitions:
-     * <li>During startup the server will be in the INITIAL state.</li>
+     * <ul><li>During startup the server will be in the INITIAL state.</li>
      * <li>After successfully starting, the server sets the state to RUNNING.
      * </li>
      * <li>The server transitions to the ERROR state if it hits an internal
@@ -615,7 +613,7 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
      * error events, e.g., SyncRequestProcessor not being able to write a txn to
      * disk.</li>
      * <li>During shutdown the server sets the state to SHUTDOWN, which
-     * corresponds to the server not running.</li>
+     * corresponds to the server not running.</li></ul>
      *
      * @param state new server state.
      */

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Command.java

@@ -65,7 +65,7 @@ public interface Command {
      * map with an appropriate message rather than throwing an exception.
      *
      * @param zkServer
-     * @param kwargs keyword -> argument value mapping
+     * @param kwargs keyword -&gt; argument value mapping
      * @return Map representing response to command containing at minimum:
      *    - "command" key containing the command's primary name
      *    - "error" key containing a String error message or null if no error

+ 6 - 6
zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java

@@ -225,10 +225,10 @@ public class Commands {
 
     /**
      * Information on session expirations and ephemerals. Returned map contains:
-     *   - "expiry_time_to_session_ids": Map<Long, Set<Long>>
-     *                                   time -> sessions IDs of sessions that expire at time
-     *   - "session_id_to_ephemeral_paths": Map<Long, Set<String>>
-     *                                       session ID -> ephemeral paths created by that session
+     *   - "expiry_time_to_session_ids": Map&lt;Long, Set&lt;Long&gt;&gt;
+     *                                   time -&gt; sessions IDs of sessions that expire at time
+     *   - "session_id_to_ephemeral_paths": Map&lt;Long, Set&lt;String&gt;&gt;
+     *                                       session ID -&gt; ephemeral paths created by that session
      * @see ZooKeeperServer#getSessionExpiryMap()
      * @see ZooKeeperServer#getEphemerals()
      */
@@ -552,7 +552,7 @@ public class Commands {
 
     /**
      * Watch information aggregated by session. Returned Map contains:
-     *   - "session_id_to_watched_paths": Map<Long, Set<String>> session ID -> watched paths
+     *   - "session_id_to_watched_paths": Map&lt;Long, Set&lt;String&gt;&gt; session ID -&gt; watched paths
      * @see DataTree#getWatches()
      */
     public static class WatchCommand extends CommandBase {
@@ -571,7 +571,7 @@ public class Commands {
 
     /**
      * Watch information aggregated by path. Returned Map contains:
-     *   - "path_to_session_ids": Map<String, Set<Long>> path -> session IDs of sessions watching path
+     *   - "path_to_session_ids": Map&lt;String, Set&lt;Long&gt;&gt; path -&gt; session IDs of sessions watching path
      * @see DataTree#getWatchesByPath()
      */
     public static class WatchesByPathCommand extends CommandBase {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/JettyAdminServer.java

@@ -43,8 +43,8 @@ import org.slf4j.LoggerFactory;
  * This class encapsulates a Jetty server for running Commands.
  *
  * Given the default settings, start a ZooKeeper server and visit
- * http://<hostname>:8080/commands for links to all registered commands. Visiting
- * http://<hostname>:8080/commands/<commandname> will execute the associated
+ * http://hostname:8080/commands for links to all registered commands. Visiting
+ * http://hostname:8080/commands/commandname will execute the associated
  * Command and return the result in the body of the response. Any keyword
  * arguments to the command are specified with URL parameters (e.g.,
  * http://localhost:8080/commands/set_trace_mask?traceMask=306).

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/auth/DigestAuthenticationProvider.java

@@ -33,7 +33,7 @@ public class DigestAuthenticationProvider implements AuthenticationProvider {
 
     /** specify a command line property with key of 
      * "zookeeper.DigestAuthenticationProvider.superDigest"
-     * and value of "super:<base64encoded(SHA1(password))>" to enable
+     * and value of "super:&lt;base64encoded(SHA1(password))&gt;" to enable
      * super user access (i.e. acls disabled)
      */
     private final static String superDigest = System.getProperty(

+ 1 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/auth/KerberosName.java

@@ -298,7 +298,7 @@ public class KerberosName {
      * Try to apply this rule to the given name represented as a parameter
      * array.
      * @param params first element is the realm, second and later elements are
-     *        are the components of the name "a/b@FOO" -> {"FOO", "a", "b"}
+     *        are the components of the name "a/b@FOO" -&gt; {"FOO", "a", "b"}
      * @return the short name if this rule applies or null
      * @throws IOException throws if something is wrong with the rules
      */
@@ -351,7 +351,6 @@ public class KerberosName {
 
   /**
    * Set the static configuration to get the rules.
-   * @param conf the new configuration
    * @throws IOException
    */
   public static void setConfiguration() throws IOException {

+ 10 - 10
zookeeper-server/src/main/java/org/apache/zookeeper/server/auth/X509AuthenticationProvider.java

@@ -42,12 +42,12 @@ import org.slf4j.LoggerFactory;
  * to perform remote host certificate authentication. The default algorithm is
  * SunX509 and a JKS KeyStore. To specify the locations of the key store and
  * trust store, set the following system properties:
- * <br/><code>zookeeper.ssl.keyStore.location</code>
- * <br/><code>zookeeper.ssl.trustStore.location</code>
- * <br/>To specify store passwords, set the following system properties:
- * <br/><code>zookeeper.ssl.keyStore.password</code>
- * <br/><code>zookeeper.ssl.trustStore.password</code>
- * <br/>Alternatively, this can be plugged with any X509TrustManager and
+ * <br><code>zookeeper.ssl.keyStore.location</code>
+ * <br><code>zookeeper.ssl.trustStore.location</code>
+ * <br>To specify store passwords, set the following system properties:
+ * <br><code>zookeeper.ssl.keyStore.password</code>
+ * <br><code>zookeeper.ssl.trustStore.password</code>
+ * <br>Alternatively, this can be plugged with any X509TrustManager and
  * X509KeyManager implementation.
  */
 public class X509AuthenticationProvider implements AuthenticationProvider {
@@ -61,10 +61,10 @@ public class X509AuthenticationProvider implements AuthenticationProvider {
     /**
      * Initialize the X509AuthenticationProvider with a JKS KeyStore and JKS
      * TrustStore according to the following system properties:
-     * <br/><code>zookeeper.ssl.keyStore.location</code>
-     * <br/><code>zookeeper.ssl.trustStore.location</code>
-     * <br/><code>zookeeper.ssl.keyStore.password</code>
-     * <br/><code>zookeeper.ssl.trustStore.password</code>
+     * <br><code>zookeeper.ssl.keyStore.location</code>
+     * <br><code>zookeeper.ssl.trustStore.location</code>
+     * <br><code>zookeeper.ssl.keyStore.password</code>
+     * <br><code>zookeeper.ssl.trustStore.password</code>
      */
     public X509AuthenticationProvider() throws X509Exception {
         ZKConfig config = new ZKConfig();

+ 1 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FilePadding.java

@@ -84,14 +84,13 @@ public class FilePadding {
     /**
      * Calculates a new file size with padding. We only return a new size if
      * the current file position is sufficiently close (less than 4K) to end of
-     * file and preAllocSize is > 0.
+     * file and preAllocSize is &gt; 0.
      *
      * @param position     the point in the file we have written to
      * @param fileSize     application keeps track of the current file size
      * @param preAllocSize how many bytes to pad
      * @return the new file size. It can be the same as fileSize if no
      * padding was done.
-     * @throws IOException
      */
     // VisibleForTesting
     public static long calculateFileSizeWithPadding(long position, long fileSize, long preAllocSize) {

+ 1 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnLog.java

@@ -717,8 +717,7 @@ public class FileTxnLog implements TxnLog {
 
         /**
          * Invoked to indicate that the input stream has been created.
-         * @param ia input archive
-         * @param is file input stream associated with the input archive.
+         * @param logFile the file to read.
          * @throws IOException
          **/
         protected InputArchive createInputArchive(File logFile) throws IOException {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java

@@ -97,7 +97,7 @@ public class SnapStream {
     /**
      * Return the CheckedInputStream based on the extension of the fileName.
      *
-     * @param fileName the file the InputStream read from
+     * @param file the file the InputStream read from
      * @return the specific InputStream
      * @throws IOException
      */
@@ -121,7 +121,7 @@ public class SnapStream {
     /**
      * Return the OutputStream based on predefined stream mode.
      *
-     * @param fileName the file the OutputStream writes to
+     * @param file the file the OutputStream writes to
      * @return the specific OutputStream
      * @throws IOException
      */

+ 0 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/FastLeaderElection.java

@@ -724,8 +724,6 @@ public class FastLeaderElection implements Election {
      * Check if a pair (server id, zxid) succeeds our
      * current vote.
      *
-     * @param id    Server identifier
-     * @param zxid  Last zxid observed by the issuer of this vote
      */
     protected boolean totalOrderPredicate(long newId, long newZxid, long newEpoch, long curId, long curZxid, long curEpoch) {
         LOG.debug("id: " + newId + ", proposed id: " + curId + ", zxid: 0x" +

+ 1 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/FollowerZooKeeperServer.java

@@ -40,7 +40,7 @@ import javax.management.JMException;
 
 /**
  * Just like the standard ZooKeeperServer. We just replace the request
- * processors: FollowerRequestProcessor -> CommitProcessor ->
+ * processors: FollowerRequestProcessor -&gt; CommitProcessor -&gt;
  * FinalRequestProcessor
  *
  * A SyncRequestProcessor is also spawned off to log proposals from the leader.
@@ -55,8 +55,6 @@ public class FollowerZooKeeperServer extends LearnerZooKeeperServer {
     ConcurrentLinkedQueue<Request> pendingSyncs;
 
     /**
-     * @param port
-     * @param dataDir
      * @throws IOException
      */
     FollowerZooKeeperServer(FileTxnSnapLog logFactory,QuorumPeer self,

+ 2 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java

@@ -1095,7 +1095,7 @@ public class Leader implements LearnerMaster {
     }
 
     /**
-     * Create an inform&activate packet and send it to all observers.
+     * Create an inform and activate packet and send it to all observers.
      */
     public void informAndActivate(Proposal proposal, long designatedLeader) {
         sendObserverPacket(buildInformAndActivePacket(proposal.request.zxid,
@@ -1211,7 +1211,6 @@ public class Leader implements LearnerMaster {
      *
      * @param handler handler of the follower
      * @return last proposed zxid
-     * @throws InterruptedException
      */
     @Override
     synchronized public long startForwarding(LearnerHandler handler,
@@ -1283,7 +1282,7 @@ public class Leader implements LearnerMaster {
     /**
      * Quit condition:
      *
-     * 1 voter goes to looking again and time waitForEpoch > maxTimeToWaitForEpoch
+     * 1 voter goes to looking again and time waitForEpoch &gt; maxTimeToWaitForEpoch
      *
      * Note: the voter may go to looking again in case of:
      * 1. change mind in the last minute when received a different notification

+ 2 - 4
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java

@@ -37,8 +37,8 @@ import java.util.concurrent.TimeUnit;
 /**
  *
  * Just like the standard ZooKeeperServer. We just replace the request
- * processors: PrepRequestProcessor -> ProposalRequestProcessor ->
- * CommitProcessor -> Leader.ToBeAppliedRequestProcessor ->
+ * processors: PrepRequestProcessor -&gt; ProposalRequestProcessor -&gt;
+ * CommitProcessor -&gt; Leader.ToBeAppliedRequestProcessor -&gt;
  * FinalRequestProcessor
  */
 public class LeaderZooKeeperServer extends QuorumZooKeeperServer {
@@ -50,8 +50,6 @@ public class LeaderZooKeeperServer extends QuorumZooKeeperServer {
     PrepRequestProcessor prepRequestProcessor;
 
     /**
-     * @param port
-     * @param dataDir
      * @throws IOException
      */
     LeaderZooKeeperServer(FileTxnSnapLog logFactory, QuorumPeer self, ZKDatabase zkDb) throws IOException {

+ 2 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java

@@ -115,7 +115,6 @@ public class Learner {
      *                the client to be revalidated
      * @param timeout
      *                the timeout for which the session is valid
-     * @return
      * @throws IOException
      */
     void validateSession(ServerCnxn cnxn, long clientId, int timeout)
@@ -249,8 +248,8 @@ public class Learner {
      * Retries until either initLimit time has elapsed or 5 tries have happened.
      * @param addr - the address of the Peer to connect to.
      * @throws IOException - if the socket connection fails on the 5th attempt
-     * <li>if there is an authentication failure while connecting to leader</li>
-     * @throws ConnectException
+     * if there is an authentication failure while connecting to leader
+     * @throws X509Exception
      * @throws InterruptedException
      */
     protected void connectToLeader(InetSocketAddress addr, String hostname)

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java

@@ -83,7 +83,7 @@ public class ObserverZooKeeperServer extends LearnerZooKeeperServer {
     
     /**
      * Set up the request processors for an Observer:
-     * firstProcesor->commitProcessor->finalProcessor
+     * firstProcesor-&gt;commitProcessor-&gt;finalProcessor
      */
     @Override
     protected void setupRequestProcessors() {      

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java

@@ -1210,8 +1210,8 @@ public class QuorumCnxManager {
     /**
      * Inserts an element in the specified queue. If the Queue is full, this
      * method removes an element from the head of the Queue and then inserts
-     * the element at the tail. It can happen that the an element is removed
-     * by another thread in {@link SendWorker#processMessage() processMessage}
+     * the element at the tail. It can happen that an element is removed
+     * by another thread in {@link SendWorker#run() }
      * method before this method attempts to remove an element from the queue.
      * This will cause {@link ArrayBlockingQueue#remove() remove} to throw an
      * exception, which is safe to ignore.

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumMXBean.java

@@ -43,12 +43,12 @@ public interface QuorumMXBean {
     public int getSyncLimit();
 
     /**
-     * @param the number of ticks that the initial synchronization phase can take
+     * @param initLimit the number of ticks that the initial synchronization phase can take
      */
     public void setInitLimit(int initLimit);
 
     /**
-     * @param the number of ticks that can pass between sending a request and getting an acknowledgment
+     * @param syncLimit the number of ticks that can pass between sending a request and getting an acknowledgment
      */
     public void setSyncLimit(int syncLimit);
 

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java

@@ -2221,7 +2221,7 @@ public class QuorumPeer extends ZooKeeperThread implements QuorumStats.Provider
      * around by skipping comparing the zxid and electionEpoch when counting for 
      * votes for out of election servers during looking for leader.
      * 
-     * {@see https://issues.apache.org/jira/browse/ZOOKEEPER-1732}
+     * See https://issues.apache.org/jira/browse/ZOOKEEPER-1732
      */
     protected void updateElectionVote(long newEpoch) {
         Vote currentVote = getCurrentVote();

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/IWatchManager.java

@@ -128,7 +128,6 @@ public interface IWatchManager {
      * @param byPath iff true output watches by paths, otw output
      * watches by connection
      *
-     * @return string representation of watches
      */
     public void dumpWatches(PrintWriter pwriter, boolean byPath);
 }

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/RemoveWatchesTest.java

@@ -1238,7 +1238,7 @@ public class RemoveWatchesTest extends ClientBase {
     /**
      * Checks if a session is registered with the server as a watcher.
      *
-     * @param long sessionId the session ID to check
+     * @param sessionId the session ID to check
      * @param path the path to check for watchers
      * @param type the type of watcher
      * @return true if the client session is a watcher on path for the type

+ 2 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/ZKParameterized.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ 4 - 4
zookeeper-server/src/test/java/org/apache/zookeeper/common/TimeTest.java

@@ -34,16 +34,16 @@ import java.util.concurrent.atomic.AtomicInteger;
 /**
  * Command line program for demonstrating robustness to clock
  * changes.
- * <p/>
+ * <p>
  * How to run:
  * ant clean compile-test
- * echo build/test/lib/*.jar build/lib/*.jar build/classes build/test/classes | sed -e 's/ /:/g' > cp
+ * echo build/test/lib/*.jar build/lib/*.jar build/classes build/test/classes | sed -e 's/ /:/g' &gt; cp
  * java -cp $(cat cp) org.apache.zookeeper.common.TimeTest | tee log-without-patch
- * <p/>
+ * <p>
  * After test program starts, in another window, do commands:
  * date -s '+1hour'
  * date -s '-1hour'
- * <p/>
+ * <p>
  * As long as there isn't any expired event, the experiment is successful.
  */
 public class TimeTest extends ClientBase {

+ 2 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/server/EphemeralTypeTest.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ 2 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/server/MockServerCnxn.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/server/ZooKeeperServerMainTest.java

@@ -326,7 +326,7 @@ public class ZooKeeperServerMainTest extends ZKTestCase implements Watcher {
     }
 
     /**
-     * Test verifies that the server shouldn't allow minsessiontimeout >
+     * Test verifies that the server shouldn't allow minsessiontimeout greater than
      * maxsessiontimeout
      */
     @Test

+ 3 - 3
zookeeper-server/src/test/java/org/apache/zookeeper/server/ZooKeeperServerStartupTest.java

@@ -72,7 +72,7 @@ public class ZooKeeperServerStartupTest extends ZKTestCase {
 
     /**
      * Test case for
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-2383}.
+     * https://issues.apache.org/jira/browse/ZOOKEEPER-2383
      */
     @Test(timeout = 30000)
     public void testClientConnectionRequestDuringStartupWithNIOServerCnxn()
@@ -110,7 +110,7 @@ public class ZooKeeperServerStartupTest extends ZKTestCase {
 
     /**
      * Test case for
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-2383}.
+     * https://issues.apache.org/jira/browse/ZOOKEEPER-2383
      */
     @Test(timeout = 30000)
     public void testClientConnectionRequestDuringStartupWithNettyServerCnxn()
@@ -163,7 +163,7 @@ public class ZooKeeperServerStartupTest extends ZKTestCase {
 
     /**
      * Test case for
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-2383}.
+     * https://issues.apache.org/jira/browse/ZOOKEEPER-2383
      */
     @Test(timeout = 30000)
     public void testFourLetterWords() throws Exception {

+ 2 - 5
zookeeper-server/src/test/java/org/apache/zookeeper/server/admin/CommandsTest.java

@@ -51,11 +51,8 @@ public class CommandsTest extends ClientBase {
      *            - the primary name of the command
      * @param kwargs
      *            - keyword arguments to the command
-     * @param keys
-     *            - the keys that are expected in the returned Map
-     * @param types
-     *            - the classes of the values in the returned Map. types[i] is
-     *            the type of the value for keys[i].
+     * @param fields
+     *            - the fields that are expected in the returned Map
      * @throws IOException
      * @throws InterruptedException
      */

+ 3 - 3
zookeeper-server/src/test/java/org/apache/zookeeper/server/persistence/FileTxnSnapLogTest.java

@@ -296,9 +296,9 @@ public class FileTxnSnapLogTest {
      *   1. Server A starts to have snap sync with leader
      *   2. After serializing the ACL map to Server A, there is a txn T1 to
      *      create a node N1 with new ACL_1 which was not exist in ACL map
-     *   3. On leader, after this txn, the ACL map will be ID1 -> (ACL_1, COUNT: 1),
-     *      and data tree N1 -> ID1
-     *   4. On server A, it will be empty ACL map, and N1 -> ID1 in fuzzy snapshot
+     *   3. On leader, after this txn, the ACL map will be ID1 -&gt; (ACL_1, COUNT: 1),
+     *      and data tree N1 -&gt; ID1
+     *   4. On server A, it will be empty ACL map, and N1 -&gt; ID1 in fuzzy snapshot
      *   5. When replaying the txn T1, it will skip at the beginning since the
      *      node is already exist, which leaves an empty ACL map, and N1 is
      *      referencing to a non-exist ACL ID1

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/FLEBackwardElectionRoundTest.java

@@ -81,7 +81,7 @@ public class FLEBackwardElectionRoundTest extends ZKTestCase {
      * they can't get a consistent set of notifications from a
      * quorum.
      *
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-1514}
+     * https://issues.apache.org/jira/browse/ZOOKEEPER-1514
      *
      *
      * @throws Exception

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/LearnerHandlerTest.java

@@ -489,7 +489,7 @@ public class LearnerHandlerTest extends ZKTestCase {
 
     /**
      * Test cases when learner has new-epcoh zxid
-     * (zxid & 0xffffffffL) == 0;
+     * (zxid &amp; 0xffffffffL) == 0;
      */
     @Test
     public void testNewEpochZxidWithTxnlogOnly() throws Exception {

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigBackupTest.java

@@ -246,7 +246,7 @@ public class ReconfigBackupTest extends QuorumPeerTestBase {
     /**
      * This test checks that if a version is appended to dynamic file,
      * then peer should use that version as quorum config version.
-     * <p/>
+     * <p>
      * The scenario: one server has an older version of 3 servers, and
      * four others have newer version of 5 servers. Finally, the lag-off one
      * should have server config of 5 servers.

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigLegacyTest.java

@@ -140,7 +140,7 @@ public class ReconfigLegacyTest extends QuorumPeerTestBase {
     }
 
     /**
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-1992}
+     * https://issues.apache.org/jira/browse/ZOOKEEPER-1992
      * 1. When a server starts from old style static config, without a client port in the server
      *    specification, it should keep the client port in static config file.
      * 2. After port reconfig, the old port should be removed from static file

+ 2 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/StandaloneDisabledTest.java

@@ -197,7 +197,7 @@ public class StandaloneDisabledTest extends QuorumPeerTestBase {
     }
 
     /**
-     * Starts servers 1 & 2 as participants and
+     * Starts servers 1 and 2 as participants and
      * adds them to the list to be reconfigured
      * into the ensemble.
      */
@@ -212,7 +212,7 @@ public class StandaloneDisabledTest extends QuorumPeerTestBase {
         }
     }
      /**
-     * Starts servers 1 & 2 as participants,
+     * Starts servers 1 and 2 as participants,
      * adds them to the list to be reconfigured
      * into the ensemble, and adds an observer
      * version of their information to a list

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/Zab1_0Test.java

@@ -181,7 +181,7 @@ public class Zab1_0Test extends ZKTestCase {
      * follower with lastAcceptedEpoch = 6 doesn't change the value
      * of epoch, and the test fails. It passes with the fix to predicate.
      * 
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-1343}
+     * https://issues.apache.org/jira/browse/ZOOKEEPER-1343
      * 
      * 
      * @throws Exception

+ 8 - 8
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/auth/QuorumAuthUpgradeTest.java

@@ -75,8 +75,8 @@ public class QuorumAuthUpgradeTest extends QuorumAuthTestBase {
 
     /**
      * Test to verify that servers are able to start without any authentication.
-     * peer0 -> quorum.auth.enableSasl=false
-     * peer1 -> quorum.auth.enableSasl=false
+     * peer0 -&gt; quorum.auth.enableSasl=false
+     * peer1 -&gt; quorum.auth.enableSasl=false
      */
     @Test(timeout = 30000)
     public void testNullAuthLearnerServer() throws Exception {
@@ -95,8 +95,8 @@ public class QuorumAuthUpgradeTest extends QuorumAuthTestBase {
 
     /**
      * Test to verify that servers are able to form quorum.
-     * peer0 -> quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
-     * peer1 -> quorum.auth.enableSasl=false, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
+     * peer0 -&gt; quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
+     * peer1 -&gt; quorum.auth.enableSasl=false, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
      */
     @Test(timeout = 30000)
     public void testAuthLearnerAgainstNullAuthServer() throws Exception {
@@ -115,8 +115,8 @@ public class QuorumAuthUpgradeTest extends QuorumAuthTestBase {
 
     /**
      * Test to verify that servers are able to form quorum.
-     * peer0 -> quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
-     * peer1 -> quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
+     * peer0 -&gt; quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
+     * peer1 -&gt; quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=false, quorum.auth.serverRequireSasl=false
      */
     @Test(timeout = 30000)
     public void testAuthLearnerAgainstNoAuthRequiredServer() throws Exception {
@@ -135,8 +135,8 @@ public class QuorumAuthUpgradeTest extends QuorumAuthTestBase {
 
     /**
      * Test to verify that servers are able to form quorum.
-     * peer0 -> quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=true, quorum.auth.serverRequireSasl=true
-     * peer1 -> quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=true, quorum.auth.serverRequireSasl=true
+     * peer0 -&gt; quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=true, quorum.auth.serverRequireSasl=true
+     * peer1 -&gt; quorum.auth.enableSasl=true, quorum.auth.learnerRequireSasl=true, quorum.auth.serverRequireSasl=true
      */
     @Test(timeout = 30000)
     public void testAuthLearnerServer() throws Exception {

+ 4 - 4
zookeeper-server/src/test/java/org/apache/zookeeper/server/util/PortForwarder.java

@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  *   This way server 1 can communicate with servers 2 and 3
  *  ....
  *   
- *   List<PortForwarder> pfs = startForwarding();
+ *   List&lt;PortForwarder&gt; pfs = startForwarding();
  *  ....
  *   // simulate a network interruption for server 1
  *   stopForwarding(pfs);
@@ -65,8 +65,8 @@ import org.slf4j.LoggerFactory;
  *   pfs = startForwarding();
  *
  *
- *  private List<PortForwarder> startForwarding() throws IOException {
- *      List<PortForwarder> res = new ArrayList<PortForwarder>();
+ *  private List&lt;PortForwarder&gt; startForwarding() throws IOException {
+ *      List&lt;PortForwarder&gt; res = new ArrayList&lt;PortForwarder&gt;();
  *      res.add(new PortForwarder(8301, 7301));
  *      res.add(new PortForwarder(8401, 7401));
  *      res.add(new PortForwarder(7302, 8302));
@@ -76,7 +76,7 @@ import org.slf4j.LoggerFactory;
  *      return res;
  *  }
  *  
- *  private void stopForwarding(List<PortForwarder> pfs) throws Exception {
+ *  private void stopForwarding(List&lt;PortForwarder&gt; pfs) throws Exception {
  *       for (PortForwarder pf : pfs) {
  *           pf.shutdown();
  *       }

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/test/AsyncOps.java

@@ -99,7 +99,7 @@ public class AsyncOps {
             latch.countDown();
         }
         
-        /** String format is rc:path:<suffix> where <suffix> is defined by each
+        /** String format is rc:path:&lt;suffix&gt; where &lt;suffix&gt; is defined by each
          * subclass individually. */
         @Override
         public String toString() {

+ 3 - 3
zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientSSLTest.java

@@ -65,12 +65,12 @@ public class ClientSSLTest extends QuorumPeerTestBase {
     }
 
     /**
-     * This test checks that client <-> server SSL works in cluster setup of ZK servers, which includes:
+     * This test checks that client - server SSL works in cluster setup of ZK servers, which includes:
      * 1. setting "secureClientPort" in "zoo.cfg" file.
      * 2. setting jvm flags for serverCnxn, keystore, truststore.
      * Finally, a zookeeper client should be able to connect to the secure port and
      * communicate with server via secure connection.
-     * <p/>
+     * <p>
      * Note that in this test a ZK server has two ports -- clientPort and secureClientPort.
      */
     @Test
@@ -120,7 +120,7 @@ public class ClientSSLTest extends QuorumPeerTestBase {
     /**
      * Developers might use standalone mode (which is the default for one server).
      * This test checks SSL works in standalone mode of ZK server.
-     * <p/>
+     * <p>
      * Note that in this test the Zk server has only secureClientPort
      */
     @Test

+ 0 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/test/ClientTest.java

@@ -825,7 +825,6 @@ public class ClientTest extends ClientBase {
 
     /**
      * We create a perfectly valid 'exists' request, except that the opcode is wrong.
-     * @return
      * @throws Exception
      */
     @Test

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/test/CnxManagerTest.java

@@ -284,7 +284,7 @@ public class CnxManagerTest extends ZKTestCase {
     /**
      * Tests a bug in QuorumCnxManager that causes a NPE when a 3.4.6
      * observer connects to a 3.5.0 server. 
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-1789}
+     * see https://issues.apache.org/jira/browse/ZOOKEEPER-1789
      * 
      * @throws Exception
      */

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java

@@ -365,7 +365,7 @@ public class FollowerResyncConcurrencyTest extends ZKTestCase {
      * This test:
      * Starts up 3 ZKs. The non-leader ZKs are writing to cluster
      * Shut down one of the non-leader ZKs.
-     * Restart after sessions have expired but <500 txns have taken place (get a diff)
+     * Restart after sessions have expired but less than 500 txns have taken place (get a diff)
      * Shut down immediately after restarting, start running separate thread with other transactions
      * Restart to a diff while transactions are running in leader
      *

+ 3 - 3
zookeeper-server/src/test/java/org/apache/zookeeper/test/JMXEnv.java

@@ -95,7 +95,7 @@ public class JMXEnv {
      * @param expectedNames
      * @return
      * @throws IOException
-     * @throws MalformedObjectNameException
+     * @throws InterruptedException
      */
     public static Set<ObjectName> ensureAll(String... expectedNames)
         throws IOException, InterruptedException
@@ -140,7 +140,7 @@ public class JMXEnv {
      * @param expectedNames
      * @return
      * @throws IOException
-     * @throws MalformedObjectNameException
+     * @throws InterruptedException
      */
     public static Set<ObjectName> ensureOnly(String... expectedNames)
         throws IOException, InterruptedException
@@ -216,7 +216,7 @@ public class JMXEnv {
      * failing if there is a mismatch. This will return the beans which are not
      * matched.
      * 
-     * {@link https://issues.apache.org/jira/browse/ZOOKEEPER-1858}
+     * https://issues.apache.org/jira/browse/ZOOKEEPER-1858
      * 
      * @param expectedNames
      *            - expected beans

+ 2 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/test/SSLAuthTest.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ 0 - 3
zookeeper-server/src/test/java/org/apache/zookeeper/test/TestHammer.java

@@ -27,9 +27,6 @@ import org.apache.zookeeper.common.Time;
 
 public class TestHammer implements VoidCallback {
 
-    /**
-     * @param args
-     */
     static int REPS = 50000;
     public static void main(String[] args) {
             long startTime = Time.currentElapsedTime();

+ 2 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/test/X509AuthTest.java

@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * <p/>
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.