Skip to content

Commit e3aeb38

Browse files
committed
Fix Javadoc error and warnings
1 parent ae02268 commit e3aeb38

9 files changed

Lines changed: 45 additions & 1 deletion

src/main/java/org/apache/commons/io/StreamIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public final class StreamIterator<E> implements Iterator<E>, AutoCloseable {
3636

3737
/**
3838
* Wraps and presents a stream as a closable resource that automatically closes itself when reaching the end of stream.
39-
* <h2>Warning</h2>
39+
* <h4>Warning</h4>
4040
* <p>
4141
* In order to close the stream, the call site MUST either close the stream it allocated OR call this iterator until the end.
4242
* </p>

src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ protected InputStream getInputStream() throws IOException {
154154
return checkOrigin().getInputStream(getOpenOptions());
155155
}
156156

157+
/**
158+
* Gets the OpenOption.
159+
*
160+
* @return the OpenOption.
161+
*/
157162
protected OpenOption[] getOpenOptions() {
158163
return openOptions;
159164
}

src/main/java/org/apache/commons/io/input/MemoryMappedFileInputStream.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ public final class MemoryMappedFileInputStream extends InputStream {
8787
*/
8888
public static class Builder extends AbstractStreamBuilder<MemoryMappedFileInputStream, Builder> {
8989

90+
/**
91+
* Constructs a new Builder.
92+
*/
9093
public Builder() {
9194
setBufferSizeDefault(DEFAULT_BUFFER_SIZE);
9295
setBufferSize(DEFAULT_BUFFER_SIZE);

src/main/java/org/apache/commons/io/input/MessageDigestCalculatingInputStream.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public static class Builder extends AbstractStreamBuilder<MessageDigestCalculati
6161

6262
private MessageDigest messageDigest;
6363

64+
/**
65+
* Constructs a new Builder.
66+
*/
6467
public Builder() {
6568
try {
6669
this.messageDigest = getDefaultMessageDigest();

src/main/java/org/apache/commons/io/input/UnsynchronizedByteArrayInputStream.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ public Builder setByteArray(final byte[] origin) {
106106
return super.setByteArray(origin);
107107
}
108108

109+
/**
110+
* Sets the length.
111+
*
112+
* @param length Must be greater or equal to 0.
113+
* @return this.
114+
*/
109115
public Builder setLength(final int length) {
110116
if (length < 0) {
111117
throw new IllegalArgumentException("length cannot be negative");
@@ -114,6 +120,12 @@ public Builder setLength(final int length) {
114120
return this;
115121
}
116122

123+
/**
124+
* Sets the offset.
125+
*
126+
* @param offset Must be greater or equal to 0.
127+
* @return this.
128+
*/
117129
public Builder setOffset(final int offset) {
118130
if (offset < 0) {
119131
throw new IllegalArgumentException("offset cannot be negative");

src/main/java/org/apache/commons/io/input/XmlStreamReader.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,23 @@ public Builder setCharset(final String charset) {
157157
return super.setCharset(Charsets.toCharset(charset, getCharsetDefault()));
158158
}
159159

160+
/**
161+
* Sets the HTTP content type.
162+
*
163+
* @param httpContentType the HTTP content type.
164+
* @return this.
165+
*/
160166
public Builder setHttpContentType(final String httpContentType) {
161167
this.httpContentType = httpContentType;
162168
return this;
163169
}
164170

171+
/**
172+
* Sets the lenient toggle.
173+
*
174+
* @param lenient the lenient toggle.
175+
* @return this.
176+
*/
165177
public Builder setLenient(final boolean lenient) {
166178
this.lenient = lenient;
167179
return this;

src/main/java/org/apache/commons/io/output/LockableFileWriter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public static class Builder extends AbstractStreamBuilder<LockableFileWriter, Bu
7070
private boolean append;
7171
private AbstractOrigin<?, ?> lockDirectory = AbstractOriginSupplier.newFileOrigin(FileUtils.getTempDirectoryPath());
7272

73+
/**
74+
* Constructs a new Builder.
75+
*/
7376
public Builder() {
7477
setBufferSizeDefault(AbstractByteArrayOutputStream.DEFAULT_SIZE);
7578
setBufferSize(AbstractByteArrayOutputStream.DEFAULT_SIZE);

src/main/java/org/apache/commons/io/output/WriterOutputStream.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ public static class Builder extends AbstractStreamBuilder<WriterOutputStream, Bu
9999
private CharsetDecoder charsetDecoder;
100100
private boolean writeImmediately;
101101

102+
/**
103+
* Constructs a new Builder.
104+
*/
102105
public Builder() {
103106
this.charsetDecoder = getCharset().newDecoder();
104107
}

src/main/java/org/apache/commons/io/output/XmlStreamWriter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public class XmlStreamWriter extends Writer {
6262
*/
6363
public static class Builder extends AbstractStreamBuilder<XmlStreamWriter, Builder> {
6464

65+
/**
66+
* Constructs a new Builder.
67+
*/
6568
public Builder() {
6669
setCharsetDefault(StandardCharsets.UTF_8);
6770
setCharset(StandardCharsets.UTF_8);

0 commit comments

Comments
 (0)