Skip to content
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
35f301f
docs: fixed javadocs warnings
Daniilchik Sep 23, 2024
32a30fd
docs: fixed javadocs warnings
Daniilchik Sep 23, 2024
9b7b0f2
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
f3cfffe
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
5bf24d4
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
c66f57e
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
62f70e4
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
5a3101d
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
ecdebda
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
7b27171
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
a358800
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
7db59c1
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
5221843
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
4ca55cb
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
f46675e
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 26, 2024
db67083
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
abb7b54
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
4a1b4c4
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
fbb6bb0
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
4d8a118
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
c650234
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
6f60dcb
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
3ae1f5e
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
8a53c5d
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
1959040
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
1fa2082
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
b0b5a38
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
db6296b
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
f595741
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
3ab7fea
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
7daaeb5
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
1e01abb
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
2bacc63
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
e959185
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
d353bed
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
e09a5d1
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
a43c9dc
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 28, 2024
86dac52
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
f377ac0
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
96e349b
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
18c7e2f
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
cb84092
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
499b2d8
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
6a35155
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
c2a3c37
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
5dbfca8
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
22697d3
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
12523eb
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
97160fd
HHDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
be2eb27
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
d7ca1b2
HDDS-11484. Add check for javadoc correctness
Daniilchik Sep 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,41 @@ jobs:
env:
OZONE_WITH_COVERAGE: false
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
javadoc:
needs:
- build-info
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
ref: ${{ needs.build-info.outputs.sha }}
- name: Cache for maven dependencies
uses: actions/cache/restore@v4
with:
path: |
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/ozone
key: maven-repo-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-repo-
- name: Download Ratis repo
if: ${{ inputs.ratis_args != '' }}
uses: actions/download-artifact@v4
with:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- name: Run a full build with javadocs generation
run: hadoop-ozone/dev-support/checks/build.sh -Pdocs -Dmaven.javadoc.skip=false -Dskip.npx -Dskip.installnpx
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadoc generation is already enabled in compile check, so this check performs duplicate work. We only need to set maven.javadoc.failOnWarnings=true in compile to catch javadoc problems.

run: hadoop-ozone/dev-support/checks/build.sh -Pdist -Dskip.npx -Dskip.installnpx -Djavac.version=${{ matrix.java }} ${{ inputs.ratis_args }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that when we compile on Java 8 some unexpected warnings appear, like https://github.com/Daniilchik/ozone/actions/runs/11087840906/job/30809312296#step:8:12947
It only appears on Java 8 and actually there's a lot more problems with Javadoc generation on this version, for example we can't @link to inner class, see: https://stackoverflow.com/a/50882307
So that's why if we need to failOnWarnings it’s better to generate Javadoc using a different version of Java rather than version 8.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compile check runs with Java 11, 17, 21, and with 8 on Mac. We can probably set failOnWarnings conditionally (something like -Dmaven.javadoc.failOnWarnings=${{ matrix.java != 8 }}).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the advice, done.

basic:
needs:
- build-info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ public void writeOnRetry(long len) throws IOException {
* it is a no op.
* @param bufferFull flag indicating whether bufferFull condition is hit or
* its called as part flush/close
* @return minimum commit index replicated to all nodes
* @throws IOException IOException in case watch gets timed out
*/
public void watchForCommit(boolean bufferFull) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public synchronized int read(ByteBuffer byteBuffer) throws IOException {
* readWithStrategy implementation, as it will never be called by the tests.
*
* @param strategy
* @return
* @return {@code int}
* @throws IOException
*/
protected abstract int readWithStrategy(ByteReaderStrategy strategy) throws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public interface BlockInputStreamFactory {
* @param blockInfo The blockInfo representing the block.
* @param pipeline The pipeline to be used for reading the block
* @param token The block Access Token
* @param verifyChecksum Whether to verify checksums or not.
* @param xceiverFactory Factory to create the xceiver in the client
* @param refreshFunction Function to refresh the block location if needed
* @return BlockExtendedInputStream of the correct type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public BlockInputStreamFactoryImpl(ByteBufferPool byteBufferPool,
* @param blockInfo The blockInfo representing the block.
* @param pipeline The pipeline to be used for reading the block
* @param token The block Access Token
* @param verifyChecksum Whether to verify checksums or not.
* @param xceiverFactory Factory to create the xceiver in the client
* @param refreshFunction Function to refresh the pipeline if needed
* @return BlockExtendedInputStream of the correct type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected int calculateExpectedDataBlocks(ECReplicationConfig rConfig) {
* Using the current position, returns the index of the blockStream we should
* be reading from. This is the index in the internal array holding the
* stream reference. The block group index will be one greater than this.
* @return
* @return {@code int}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of description is redundant, return type is shown in method signature. If no meaningful description can be added, we can remove the @return tag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

*/
protected int currentStreamIndex() {
return (int)((position / ecChunkSize) % repConfig.getData());
Expand Down Expand Up @@ -206,7 +206,7 @@ protected BlockExtendedInputStream getOrOpenStream(int locationIndex) throws IOE
* to the replicaIndex given based on the EC pipeline fetched from SCM.
* @param replicaIndex
* @param refreshFunc
* @return
* @return {@code Function<BlockID, BlockLocationInfo>}
*/
protected Function<BlockID, BlockLocationInfo> ecPipelineRefreshFunction(
int replicaIndex, Function<BlockID, BlockLocationInfo> refreshFunc) {
Expand Down Expand Up @@ -241,7 +241,7 @@ protected Function<BlockID, BlockLocationInfo> ecPipelineRefreshFunction(
* potentially partial last stripe. Note that the internal block index is
* numbered starting from 1.
* @param index - Index number of the internal block, starting from 1
* @return
* @return {@code long}
*/
protected long internalBlockLength(int index) {
long lastStripe = blockInfo.getLength() % stripeSize;
Expand Down Expand Up @@ -344,7 +344,7 @@ protected boolean shouldRetryFailedRead(int failedIndex) {
* strategy buffer. This call may read from several internal BlockInputStreams
* if there is sufficient space in the buffer.
* @param strategy
* @return
* @return {@code int}
* @throws IOException
*/
@Override
Expand Down Expand Up @@ -409,7 +409,7 @@ protected void seekStreamIfNecessary(BlockExtendedInputStream stream,
* group length.
* @param stream Stream to read from
* @param strategy The ReaderStrategy to read data into
* @return
* @return {@code int}
* @throws IOException
*/
private int readFromStream(BlockExtendedInputStream stream,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public interface ECBlockInputStreamFactory {
* know are bad and should not be used.
* @param repConfig The replication Config
* @param blockInfo The blockInfo representing the block.
* @param verifyChecksum Whether to verify checksums or not.
* @param xceiverFactory Factory to create the xceiver in the client
* @param refreshFunction Function to refresh the block location if needed
* @return BlockExtendedInputStream of the correct type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ private ECBlockInputStreamFactoryImpl(BlockInputStreamFactory streamFactory,
* know are bad and should not be used.
* @param repConfig The replication Config
* @param blockInfo The blockInfo representing the block.
* @param verifyChecksum Whether to verify checksums or not.
* @param xceiverFactory Factory to create the xceiver in the client
* @param refreshFunction Function to refresh the pipeline if needed
* @return BlockExtendedInputStream of the correct type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
* Parity elements long. Missing or not needed elements should be set to null
* in the array. The elements should be assigned to the array in EC index order.
*
* Assuming we have n missing data locations, where n <= parity locations, the
* Assuming we have n missing data locations, where n {@literal <=} parity locations, the
* ByteBuffers passed in from the client are either assigned to the decoder
* input array, or they are assigned to the decoder output array, where
* reconstructed data is written. The required number of parity buffers will be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ public static File createDir(String dirPath) {
* Utility string formatter method to display SCM roles.
*
* @param nodes
* @return
* @return String
*/
public static String format(List<String> nodes) {
StringBuilder sb = new StringBuilder();
Expand Down Expand Up @@ -680,7 +680,8 @@ public static int roundupMb(long bytes) {

/**
* Unwrap exception to check if it is some kind of access control problem
* ({@link AccessControlException} or {@link SecretManager.InvalidToken})
* ({@link org.apache.hadoop.security.AccessControlException} or
* {@link org.apache.hadoop.security.token.SecretManager.InvalidToken})
* or a RpcException.
*/
public static Throwable getUnwrappedException(Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
* class or method not changing over time. Currently the stability can be
* {@link Stable}, {@link Evolving} or {@link Unstable}. <br>
*
* <ul><li>All classes that are annotated with {@link Public} or
* {@link LimitedPrivate} must have InterfaceStability annotation. </li>
* <li>Classes that are {@link Private} are to be considered unstable unless
* <ul><li>All classes that are annotated with {@link InterfaceAudience.Public} or
* {@link InterfaceAudience.LimitedPrivate} must have InterfaceStability annotation. </li>
* <li>Classes that are {@link InterfaceAudience.Private} are to be considered unstable unless
* a different InterfaceStability annotation states otherwise.</li>
* <li>Incompatible changes must not be made to classes marked as stable.</li>
* </ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static JsonNode getBeansJsonNode(String metricsJson) throws IOException {
* Returns the number of decommissioning nodes.
*
* @param jsonNode
* @return
* @return {@code int}
*/
public static int getNumDecomNodes(JsonNode jsonNode) {
int numDecomNodes;
Expand All @@ -118,7 +118,7 @@ public static int getNumDecomNodes(JsonNode jsonNode) {
* @param numDecomNodes
* @param countsMap
* @param errMsg
* @return
* @return {@code Map<String, Object>}
* @throws IOException
*/
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@

/**
* This class contains constants for Recon related configuration keys used in
* SCM & Datanode.
* SCM &amp; Datanode.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "and" is simpler, and more readable in code view.

Suggested change
* SCM &amp; Datanode.
* SCM and Datanode.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

*/
public final class ReconConfigKeys {

/**
/**This class contains constants for Recon related configuration keys used in
* SCM &amp; Datanode.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to repeat the class description?

Javadoc comment can be converted to regular code comment on private constructor.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* Never constructed.
*/
private ReconConfigKeys() {
Expand Down Expand Up @@ -71,7 +72,7 @@ private ReconConfigKeys() {
* Recon administrator users delimited by a comma.
* This is the list of users who can access admin only information from recon.
* Users defined in
* {@link org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_ADMINISTRATORS}
* {@link org.apache.hadoop.ozone.OzoneConfigKeys#OZONE_ADMINISTRATORS}
* will always be able to access all recon information regardless of this
* setting.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ public int getScmDefaultLayoutVersionOnInit() {
* required for SCMSecurityProtocol where the KerberosInfo references
* the old configuration with
* the annotation shown below:-
* @KerberosInfo(serverPrincipal = ScmConfigKeys
* .HDDS_SCM_KERBEROS_PRINCIPAL_KEY)
* {@code @KerberosInfo(serverPrincipal = ScmConfigKeys.HDDS_SCM_KERBEROS_PRINCIPAL_KEY)}
*/
public static class ConfigStrings {
public static final String HDDS_SCM_KERBEROS_PRINCIPAL_KEY =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ StartContainerBalancerResponseProto startContainerBalancer(
* Force generates new secret keys (rotate).
*
* @param force boolean flag that forcefully rotates the key on demand
* @return
* @throws IOException
*/
boolean rotateSecretKeys(boolean force) throws IOException;
Expand All @@ -414,7 +413,7 @@ StartContainerBalancerResponseProto startContainerBalancer(
* considered to be failed if it has been sent more than MAX_RETRY limit
* and its count is reset to -1.
*
* @param count Maximum num of returned transactions, if < 0. return all.
* @param count Maximum num of returned transactions, if {@literal < 0}. return all.
* @param startTxId The least transaction id to start with.
* @return a list of failed deleted block transactions.
* @throws IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public long getReportTimeStamp() {

/**
* Return a map of all stats and their value as a long.
* @return
* @return {@code Map<String, Long>}
*/
public Map<String, Long> getStats() {
Map<String, Long> result = new HashMap<>();
Expand All @@ -159,7 +159,7 @@ public Map<String, Long> getStats() {
/**
* Return a map of all samples, with the stat as the key and the samples
* for the stat as a List of Long.
* @return
* @return {@code Map<String, List<Long>>}
*/
public Map<String, List<Long>> getSamples() {
Map<String, List<Long>> result = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class SCMNodeInfo {
/**
* Build SCM Node information from configuration.
* @param conf
* @return
* @return {@code List<SCMNodeInfo>}
*/
public static List<SCMNodeInfo> buildNodeInfo(ConfigurationSource conf) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,13 @@ public void remove(Node node) {
* @param loc string location of a node. If loc starts with "/", it's a
* absolute path, otherwise a relative path. Following examples
* are all accepted,
* <pre>
* {@code
* 1. /dc1/rm1/rack1 -> an inner node
* 2. /dc1/rm1/rack1/node1 -> a leaf node
* 3. rack1/node1 -> a relative path to this node
*
* }
* </pre>
* @return null if the node is not found
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public int getReplicaIndex(DatanodeDetails dn) {

/**
* Get the replicaIndex Map.
* @return
* @return {@code Map<DatanodeDetails, Integer>}
*/
public Map<DatanodeDetails, Integer> getReplicaIndexes() {
return this.getNodes().stream().collect(Collectors.toMap(Function.identity(), this::getReplicaIndex));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ Pipeline createReplicationPipeline(HddsProtos.ReplicationType type,
* considered to be failed if it has been sent more than MAX_RETRY limit
* and its count is reset to -1.
*
* @param count Maximum num of returned transactions, if < 0. return all.
* @param count Maximum num of returned transactions, if {@literal < 0}. return all.
* @param startTxId The least transaction id to start with.
* @return a list of failed deleted block transactions.
* @throws IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static InetSocketAddress updateListenAddress(OzoneConfiguration conf,
* Fall back to OZONE_METADATA_DIRS if not defined.
*
* @param conf
* @return
* @return File
*/
public static File getScmDbDir(ConfigurationSource conf) {
File metadataDir = getDirectoryFromConfig(conf,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/**
* Simple general resource leak detector using {@link ReferenceQueue} and {@link java.lang.ref.WeakReference} to
* observe resource object life-cycle and assert proper resource closure before they are GCed.
*
* <p>
* Example usage:
*
Expand All @@ -43,16 +42,18 @@
* // report leaks, don't refer to the original object (MyResource) here.
* System.out.println("MyResource is not closed before being discarded.");
* });
*
* @Override
* }
* }
* </pre>
* <pre>
* {@code @Override
* public void close() {
* // proper resources cleanup...
* // inform tracker that this object is closed properly.
* leakTracker.close();
* }
* }
*
* }</pre>
* }
* </pre>
*/
public class LeakDetector {
private static final Logger LOG = LoggerFactory.getLogger(LeakDetector.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import java.io.IOException;

/**
* A {@link Codec} to serialize/deserialize objects by delegation.
* A {@link org.apache.hadoop.hdds.utils.db.Codec} to serialize/deserialize objects by delegation.
*
* @param <T> The object type of this {@link Codec}.
* @param <T> The object type of this {@link org.apache.hadoop.hdds.utils.db.Codec}.
* @param <DELEGATE> The object type of the {@link #delegate}.
*/
public class DelegatedCodec<T, DELEGATE> implements Codec<T> {
Expand Down Expand Up @@ -53,8 +53,8 @@ public enum CopyType {
* Construct a {@link Codec} using the given delegate.
*
* @param delegate the delegate {@link Codec}
* @param forward a function to convert {@link DELEGATE} to {@link T}.
* @param backward a function to convert {@link T} back to {@link DELEGATE}.
* @param forward a function to convert {@code DELEGATE} to {@code T}.
* @param backward a function to convert {@code T} back to {@code DELEGATE}.
* @param copyType How to {@link #copyObject(Object)}?
*/
public DelegatedCodec(Codec<DELEGATE> delegate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private OzoneConsts() {
* contains illegal characters when creating/renaming key.
*
* Avoid the following characters in a key name:
* "\", "{", "}", "<", ">", "^", "%", "~", "#", "|", "`", "[", "]", Quotation
* {@literal "\", "{", "}", "<", ">", "^", "%", "~", "#", "|", "`", "[", "]"}, Quotation
* marks and Non-printable ASCII characters (128–255 decimal characters).
* https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ static ChunkBuffer allocate(int capacity) {
return allocate(capacity, 0);
}

/**
* Similar to {@link ByteBuffer#allocate(int)}
/** Similar to {@link ByteBuffer#allocate(int)}
* except that it can specify the increment.
*
* @param increment
* the increment size so that this buffer is allocated incrementally.
* When increment <= 0, entire buffer is allocated in the beginning.
* When increment {@literal <= 0}, entire buffer is allocated in the beginning.
*/
static ChunkBuffer allocate(int capacity, int increment) {
if (increment > 0 && increment < capacity) {
Expand Down
Loading