From 3881f1933500765ca1f211de855fa8d1dcd22402 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Fri, 26 Oct 2018 10:57:42 +1000 Subject: [PATCH] Fix JavaDoc errors due to invalid HTML on JDK 11. (#160) --- .../tech/pegasys/pantheon/ethereum/core/Address.java | 5 ++--- .../ethereum/mainnet/AbstractMessageProcessor.java | 3 ++- .../ethereum/p2p/discovery/PeerDiscoveryEvent.java | 8 ++++---- .../ethereum/p2p/discovery/internal/Bucket.java | 2 +- .../discovery/internal/PeerDiscoveryController.java | 8 ++++---- .../ethereum/p2p/discovery/internal/PeerTable.java | 4 ++-- .../pantheon/ethereum/p2p/rlpx/framing/Framer.java | 8 ++++---- .../ethereum/p2p/rlpx/handshake/Handshaker.java | 6 +++--- .../rlpx/handshake/ecies/ECIESEncryptionEngine.java | 10 +++++----- .../p2p/rlpx/handshake/ecies/ECIESHandshaker.java | 10 ++++++---- .../pegasys/pantheon/ethereum/p2p/wire/PeerInfo.java | 2 +- .../tech/pegasys/pantheon/ethereum/rlp/RLPInput.java | 9 +++++---- 12 files changed, 39 insertions(+), 36 deletions(-) diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/Address.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/Address.java index ea9d15c8d0..68ced6843e 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/Address.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/Address.java @@ -67,9 +67,8 @@ public class Address extends DelegatingBytesValue { } /** - * @param hash A hash that has been obtained through hashing the return of the - * ECDSARECOVER function from Appendix F (Signing Transactions) of the Ethereum - * Yellow Paper. + * @param hash A hash that has been obtained through hashing the return of the ECDSARECOVER + * function from Appendix F (Signing Transactions) of the Ethereum Yellow Paper. * @return The ethereum address from the provided hash. */ public static Address extract(final Hash hash) { diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AbstractMessageProcessor.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AbstractMessageProcessor.java index 5b37503de8..719a47c22d 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AbstractMessageProcessor.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AbstractMessageProcessor.java @@ -31,7 +31,8 @@ import java.util.stream.Collectors; * default behaviors. There is currently no method for responding to a {@link * MessageFrame.State#CODE_SUSPENDED}. * - * + *
+ * * * * diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryEvent.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryEvent.java index fb1f44751e..20f2f92291 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryEvent.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryEvent.java @@ -41,8 +41,8 @@ public abstract class PeerDiscoveryEvent { } /** - * An event that is dispatched whenever we bond with a new peer. See Javadoc on - * PeerDiscoveryController to understand when this happens. + * An event that is dispatched whenever we bond with a new peer. See Javadoc on + * PeerDiscoveryController to understand when this happens. * *

{@link tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PeerDiscoveryController} */ @@ -53,8 +53,8 @@ public abstract class PeerDiscoveryEvent { } /** - * An event that is dispatched whenever we drop a peer from the peer table. See Javadoc on - * PeerDiscoveryController to understand when this happens. + * An event that is dispatched whenever we drop a peer from the peer table. See Javadoc on + * PeerDiscoveryController to understand when this happens. * *

{@link tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PeerDiscoveryController} */ diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/Bucket.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/Bucket.java index e2a1d968bd..6f30b66583 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/Bucket.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/Bucket.java @@ -110,7 +110,7 @@ public class Bucket { * the left (subtracts one from their indices). * * @param peer the element to be removed - * @return true + * @return true */ synchronized boolean evict(final PeerId peer) { // If the bucket is empty, there's nothing to evict. diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java index 5e71bbf5fc..f24574d46c 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java @@ -81,10 +81,10 @@ import org.apache.logging.log4j.Logger; *

  • DROPPED (*): the peer is no longer in our peer table. * * - *

    (*) It is worthy to note that the MESSAGE_EXPECTED and DROPPED states are - * not modelled explicitly in {@link PeerDiscoveryStatus}, but they have been included in the - * diagram for clarity. These two states define the elimination path for a peer from the underlying - * table. + *

    (*) It is worthy to note that the MESSAGE_EXPECTED and DROPPED + * states are not modelled explicitly in {@link PeerDiscoveryStatus}, but they have been included in + * the diagram for clarity. These two states define the elimination path for a peer from the + * underlying table. * *

    If an expectation to receive a message was unmet, following the evaluation of a failure * condition, the peer will be physically dropped (eliminated) from the table. diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerTable.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerTable.java index 33964ff094..3442b86afe 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerTable.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerTable.java @@ -169,12 +169,12 @@ public class PeerTable { } /** - * Returns the limit peers (at most) closest to the provided target, based on the XOR + * Returns the limit peers (at most) closest to the provided target, based on the XOR * distance between the keccak-256 hash of the ID and the keccak-256 hash of the target. * * @param target The target node ID. * @param limit The amount of results to return. - * @return The limit closest peers, at most. + * @return The limit closest peers, at most. */ public List nearestPeers(final BytesValue target, final int limit) { final BytesValue keccak256 = Hash.keccak256(target); diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/framing/Framer.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/framing/Framer.java index b7384a8e42..0de9ec2f26 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/framing/Framer.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/framing/Framer.java @@ -111,12 +111,12 @@ public class Framer { * Deframes a full message from the byte buffer, if possible. * *

    If the byte buffer contains insufficient bytes to extract a full message, this method - * returns null. + * returns null. * *

    If the buffer contains at least a header, it offloads it and processes it, setting an * internal expectation to subsequently receive as many bytes for the frame as the header - * specified. In this case, this method also returns null to inform the caller that it - * requires more bytes before it can produce an output. + * specified. In this case, this method also returns null to inform the caller that + * it requires more bytes before it can produce an output. * *

    This method can be called repetitively whenever new bytes appear in the buffer. It is worthy * to note that the byte buffer is not consumed unless the next expected amount of bytes appears. @@ -129,7 +129,7 @@ public class Framer { * connection, as the digests and stream ciphers could have become corrupted. * * @param buf The buffer containing no messages, partial messages or multiple messages. - * @return The first fully extracted message from this buffer, or null if no message + * @return The first fully extracted message from this buffer, or null if no message * could be extracted yet. * @throws FramingException Thrown when a decryption or internal error occurs. */ diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/Handshaker.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/Handshaker.java index 63f9ea7ea5..dd94e1ab92 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/Handshaker.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/Handshaker.java @@ -71,7 +71,7 @@ public interface Handshaker { * This method must be called by the initiating side of the handshake to provide the * initial crypto material for the handshake, before any further methods are called. * - *

    This method must throw an IllegalStateException exception if the handshake had + *

    This method must throw an {@link IllegalStateException} exception if the handshake had * already been prepared before, no matter if under the initiator or the responder role. * * @param ourKeypair The keypair for our node identity. @@ -84,7 +84,7 @@ public interface Handshaker { * This method must be called by the responding side of the handshake to prepare the * initial crypto material for the handshake, before any further methods are called. * - *

    This method must throw an IllegalStateException exception if the handshake had + *

    This method must throw an {@link IllegalStateException} exception if the handshake had * already been prepared before, whether with the initiator or the responder role. * * @param ourKeypair The keypair for our node identity. @@ -100,7 +100,7 @@ public interface Handshaker { * the initiator is allowed to send the first message in the channel. Future implementations may * allow for a concurrent exchange. * - *

    This method will throw an IllegalStateException if the consumer has prepared this + *

    This method will throw an {@link IllegalStateException} if the consumer has prepared this * handshake taking the role of the responder, and the underlying implementation only allows the * initiator to send the first message. * diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESEncryptionEngine.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESEncryptionEngine.java index d92858afdc..ee7dee2556 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESEncryptionEngine.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESEncryptionEngine.java @@ -50,8 +50,8 @@ import org.bouncycastle.util.Pack; * Scheme engine that implements the encryption and decryption logic behind the ECIES crypto * handshake during the RLPx connection establishment. * - *

    This class has been inspired by the IESEngine implementation in Bouncy Castle. It has - * been modified heavily to accommodate our usage, yet the core logic remains unchanged. It + *

    This class has been inspired by the IESEngine implementation in Bouncy Castle. It + * has been modified heavily to accommodate our usage, yet the core logic remains unchanged. It * implements a peculiarity of the Ethereum encryption protocol: updating the encryption MAC with * the IV. */ @@ -341,8 +341,8 @@ public class ECIESEncryptionEngine { * Key generation function as defined in NIST SP 800-56A, but swapping the order of the digested * values (counter first, shared secret second) to comply with Ethereum's approach. * - *

    This class has been adapted from the BaseKDFBytesGenerator implementation of Bouncy - * Castle. + *

    This class has been adapted from the BaseKDFBytesGenerator implementation of + * Bouncy Castle. */ private static class ECIESHandshakeKDFFunction implements DigestDerivationFunction { private static final int COUNTER_START = 1; @@ -371,7 +371,7 @@ public class ECIESEncryptionEngine { } /** - * Fills len bytes of the output buffer with bytes generated from the derivation + * Fills len bytes of the output buffer with bytes generated from the derivation * function. * * @throws IllegalArgumentException If the size of the request will cause an overflow. diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESHandshaker.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESHandshaker.java index 9f0b152cef..0cc0241c53 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESHandshaker.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/handshake/ecies/ECIESHandshaker.java @@ -301,12 +301,14 @@ public class ECIESHandshaker implements Handshaker { /** * Returns the current status of this handshake. * - *

    Starts UNINITIALIZED and moves to PREPARED when a prepared* method is - * called, or to IN_PROGRESS if we're the responder part and have nothing to prepare + *

    Starts {@link Handshaker.HandshakeStatus#UNINITIALIZED} and moves to {@link + * Handshaker.HandshakeStatus#PREPARED} when a prepared* method is called, or to {@link + * Handshaker.HandshakeStatus#IN_PROGRESS} if we're the responder part and have nothing to prepare * since we're awaiting the initiator's message. * - *

    As soon as we receive the expected message, the status transitions to SUCCESS if - * the message is well formed and we're able to generate the resulting secrets. + *

    As soon as we receive the expected message, the status transitions to {@link + * Handshaker.HandshakeStatus#SUCCESS} if the message is well formed and we're able to generate + * the resulting secrets. * * @return Returns the current status of this handshake. */ diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/wire/PeerInfo.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/wire/PeerInfo.java index c38c45be5c..ae9ab4ce4a 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/wire/PeerInfo.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/wire/PeerInfo.java @@ -32,7 +32,7 @@ import io.netty.buffer.ByteBuf; * Encapsulates information about a peer, including their protocol version, client ID, capabilities * and other. * - *

    The peer info is shared between peers during the HELLO wire protocol handshake. + *

    The peer info is shared between peers during the HELLO wire protocol handshake. */ public class PeerInfo { private final int version; diff --git a/ethereum/rlp/src/main/java/tech/pegasys/pantheon/ethereum/rlp/RLPInput.java b/ethereum/rlp/src/main/java/tech/pegasys/pantheon/ethereum/rlp/RLPInput.java index 696b55c4c1..f34ea0fdc2 100644 --- a/ethereum/rlp/src/main/java/tech/pegasys/pantheon/ethereum/rlp/RLPInput.java +++ b/ethereum/rlp/src/main/java/tech/pegasys/pantheon/ethereum/rlp/RLPInput.java @@ -110,7 +110,8 @@ public interface RLPInput { /** * Exits the current list after all its items have been consumed. * - *

    This method is equivalent to calling {@link #leaveList(boolean)} with value false. + *

    This method is equivalent to calling {@link #leaveList(boolean)} with value false + * . * *

    Note that this method technically doesn't consume any input but must be called after having * read the last element of a list. This allow to ensure the structure of the input is indeed the @@ -128,9 +129,9 @@ public interface RLPInput { * one expected. * * @param ignoreRest Whether to ignore any remaining elements in the list. If elements remain and - * this parameter is false, an exception will be thrown. - * @throws RLPException if the current list is not finished (it has more items), if - * ignoreRest is false. + * this parameter is false, an exception will be thrown. + * @throws RLPException if the current list is not finished (it has more items), if + * ignoreRest is false. */ void leaveList(boolean ignoreRest);

  • Method Overview
    {@code MessageFrame.State}Method