Skip to content

Commit 90c9d39

Browse files
committed
Fix deprecation comments and end sentence with a period
- Add missing comment. - Close HTML tags. - Typos
1 parent c5adbaf commit 90c9d39

File tree

166 files changed

+1728
-1719
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+1728
-1719
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ public class ByteOrderMark implements Serializable {
128128
/**
129129
* Constructs a new instance.
130130
*
131-
* @param charsetName The name of the charset the BOM represents
132-
* @param bytes The BOM's bytes
133-
* @throws IllegalArgumentException if the charsetName is zero length
134-
* @throws IllegalArgumentException if the bytes are zero length
131+
* @param charsetName The name of the charset the BOM represents.
132+
* @param bytes The BOM's bytes.
133+
* @throws IllegalArgumentException if the charsetName is zero length.
134+
* @throws IllegalArgumentException if the bytes are zero length.
135135
*/
136136
public ByteOrderMark(final String charsetName, final int... bytes) {
137137
Objects.requireNonNull(charsetName, "charsetName");
@@ -149,9 +149,9 @@ public ByteOrderMark(final String charsetName, final int... bytes) {
149149
/**
150150
* Indicates if this instance's bytes equals another.
151151
*
152-
* @param obj The object to compare to
152+
* @param obj The object to compare to.
153153
* @return true if the bom's bytes are equal, otherwise
154-
* false
154+
* false.
155155
*/
156156
@Override
157157
public boolean equals(final Object obj) {
@@ -173,8 +173,8 @@ public boolean equals(final Object obj) {
173173
/**
174174
* Gets the byte at the specified position.
175175
*
176-
* @param pos The position
177-
* @return The specified byte
176+
* @param pos The position.
177+
* @return The specified byte.
178178
*/
179179
public int get(final int pos) {
180180
return bytes[pos];
@@ -183,7 +183,7 @@ public int get(final int pos) {
183183
/**
184184
* Gets a copy of the BOM's bytes.
185185
*
186-
* @return a copy of the BOM's bytes
186+
* @return a copy of the BOM's bytes.
187187
*/
188188
public byte[] getBytes() {
189189
final byte[] copy = IOUtils.byteArray(bytes.length);
@@ -196,7 +196,7 @@ public byte[] getBytes() {
196196
/**
197197
* Gets the name of the {@link java.nio.charset.Charset} the BOM represents.
198198
*
199-
* @return the character set name
199+
* @return the character set name.
200200
*/
201201
public String getCharsetName() {
202202
return charsetName;
@@ -224,7 +224,7 @@ public int hashCode() {
224224
/**
225225
* Gets the length of the BOM's bytes.
226226
*
227-
* @return the length of the BOM's bytes
227+
* @return the length of the BOM's bytes.
228228
*/
229229
public int length() {
230230
return bytes.length;
@@ -260,7 +260,7 @@ public boolean matches(final int[] test) {
260260
/**
261261
* Converts this instance to a String representation of the BOM.
262262
*
263-
* @return the length of the BOM's bytes
263+
* @return the length of the BOM's bytes.
264264
*/
265265
@Override
266266
public String toString() {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public final class ByteOrderParser {
4141
* </ul>
4242
*
4343
* @param value
44-
* the {@link String} containing the ByteOrder representation to be parsed
45-
* @return the ByteOrder represented by the string argument
44+
* the {@link String} containing the ByteOrder representation to be parsed.
45+
* @return the ByteOrder represented by the string argument.
4646
* @throws IllegalArgumentException
4747
* if the {@link String} containing the ByteOrder representation to be parsed is unknown.
4848
*/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public static SortedMap<String, Charset> requiredCharsets() {
210210
*
211211
* @param charset
212212
* A charset or null.
213-
* @return the given Charset or the default Charset if the given Charset is null
213+
* @return the given Charset or the default Charset if the given Charset is null.
214214
* @see Charset#defaultCharset()
215215
*/
216216
public static Charset toCharset(final Charset charset) {
@@ -277,7 +277,7 @@ public static Charset toCharsetDefault(final String charsetName, final Charset d
277277
/**
278278
* Construct a new instance.
279279
*
280-
* @deprecated Will be private in 4.0
280+
* @deprecated Will be private in 3.0.
281281
*/
282282
@Deprecated
283283
public Charsets() {

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

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ public class CopyUtils {
117117

118118
/**
119119
* Copies bytes from a {@code byte[]} to an {@link OutputStream}.
120-
* @param input the byte array to read from
121-
* @param output the {@link OutputStream} to write to
122-
* @throws IOException In case of an I/O problem
120+
* @param input the byte array to read from.
121+
* @param output the {@link OutputStream} to write to.
122+
* @throws IOException In case of an I/O problem.
123123
*/
124124
public static void copy(final byte[] input, final OutputStream output) throws IOException {
125125
output.write(input);
@@ -130,10 +130,10 @@ public static void copy(final byte[] input, final OutputStream output) throws IO
130130
* {@link Writer}.
131131
* The platform's default encoding is used for the byte-to-char conversion.
132132
*
133-
* @param input the byte array to read from
134-
* @param output the {@link Writer} to write to
135-
* @throws IOException In case of an I/O problem
136-
* @deprecated Use {@link #copy(byte[], Writer, String)} instead
133+
* @param input the byte array to read from.
134+
* @param output the {@link Writer} to write to.
135+
* @throws IOException In case of an I/O problem.
136+
* @deprecated Use {@link #copy(byte[], Writer, String)} instead.
137137
*/
138138
@Deprecated
139139
public static void copy(final byte[] input, final Writer output) throws IOException {
@@ -145,12 +145,12 @@ public static void copy(final byte[] input, final Writer output) throws IOExcept
145145
* Copies and convert bytes from a {@code byte[]} to chars on a
146146
* {@link Writer}, using the specified encoding.
147147
*
148-
* @param input the byte array to read from
149-
* @param output the {@link Writer} to write to
148+
* @param input the byte array to read from.
149+
* @param output the {@link Writer} to write to.
150150
* @param encoding The name of a supported character encoding. See the
151151
* <a href="https://www.iana.org/assignments/character-sets">IANA
152152
* Charset Registry</a> for a list of valid encoding types.
153-
* @throws IOException In case of an I/O problem
153+
* @throws IOException In case of an I/O problem.
154154
*/
155155
public static void copy(final byte[] input, final Writer output, final String encoding) throws IOException {
156156
final ByteArrayInputStream inputStream = new ByteArrayInputStream(input);
@@ -161,10 +161,10 @@ public static void copy(final byte[] input, final Writer output, final String en
161161
* Copies bytes from an {@link InputStream} to an
162162
* {@link OutputStream}.
163163
*
164-
* @param input the {@link InputStream} to read from
165-
* @param output the {@link OutputStream} to write to
166-
* @return the number of bytes copied
167-
* @throws IOException In case of an I/O problem
164+
* @param input the {@link InputStream} to read from.
165+
* @param output the {@link OutputStream} to write to.
166+
* @return the number of bytes copied.
167+
* @throws IOException In case of an I/O problem.
168168
*/
169169
public static int copy(final InputStream input, final OutputStream output) throws IOException {
170170
final byte[] buffer = IOUtils.byteArray();
@@ -184,10 +184,10 @@ public static int copy(final InputStream input, final OutputStream output) throw
184184
* This method uses the virtual machine's {@linkplain Charset#defaultCharset() default charset} for byte-to-char conversion.
185185
* </p>
186186
*
187-
* @param input the {@link InputStream} to read from
188-
* @param output the {@link Writer} to write to
189-
* @throws IOException In case of an I/O problem
190-
* @deprecated Use {@link #copy(InputStream, Writer, String)} instead
187+
* @param input the {@link InputStream} to read from.
188+
* @param output the {@link Writer} to write to.
189+
* @throws IOException In case of an I/O problem.
190+
* @deprecated Use {@link #copy(InputStream, Writer, String)} instead.
191191
*/
192192
@Deprecated
193193
public static void copy(
@@ -203,12 +203,12 @@ public static void copy(
203203
* Copies and convert bytes from an {@link InputStream} to chars on a
204204
* {@link Writer}, using the specified encoding.
205205
*
206-
* @param input the {@link InputStream} to read from
207-
* @param output the {@link Writer} to write to
206+
* @param input the {@link InputStream} to read from.
207+
* @param output the {@link Writer} to write to.
208208
* @param encoding The name of a supported character encoding. See the
209209
* <a href="https://www.iana.org/assignments/character-sets">IANA
210210
* Charset Registry</a> for a list of valid encoding types.
211-
* @throws IOException In case of an I/O problem
211+
* @throws IOException In case of an I/O problem.
212212
*/
213213
public static void copy(
214214
final InputStream input,
@@ -226,10 +226,10 @@ public static void copy(
226226
* This method uses the virtual machine's {@linkplain Charset#defaultCharset() default charset} for byte-to-char conversion.
227227
* </p>
228228
*
229-
* @param input the {@link Reader} to read from
230-
* @param output the {@link OutputStream} to write to
231-
* @throws IOException In case of an I/O problem
232-
* @deprecated Use {@link #copy(Reader, OutputStream, String)} instead
229+
* @param input the {@link Reader} to read from.
230+
* @param output the {@link OutputStream} to write to.
231+
* @throws IOException In case of an I/O problem.
232+
* @deprecated Use {@link #copy(Reader, OutputStream, String)} instead.
233233
*/
234234
@Deprecated
235235
public static void copy(
@@ -248,12 +248,12 @@ public static void copy(
248248
* Serialize chars from a {@link Reader} to bytes on an
249249
* {@link OutputStream}, and flush the {@link OutputStream}.
250250
*
251-
* @param input the {@link Reader} to read from
252-
* @param output the {@link OutputStream} to write to
251+
* @param input the {@link Reader} to read from.
252+
* @param output the {@link OutputStream} to write to.
253253
* @param encoding The name of a supported character encoding. See the
254254
* <a href="https://www.iana.org/assignments/character-sets">IANA
255255
* Charset Registry</a> for a list of valid encoding types.
256-
* @throws IOException In case of an I/O problem
256+
* @throws IOException In case of an I/O problem.
257257
* @since 2.5
258258
*/
259259
public static void copy(
@@ -271,10 +271,10 @@ public static void copy(
271271
/**
272272
* Copies chars from a {@link Reader} to a {@link Writer}.
273273
*
274-
* @param input the {@link Reader} to read from
275-
* @param output the {@link Writer} to write to
276-
* @return the number of characters copied
277-
* @throws IOException In case of an I/O problem
274+
* @param input the {@link Reader} to read from.
275+
* @param output the {@link Writer} to write to.
276+
* @return the number of characters copied.
277+
* @throws IOException In case of an I/O problem.
278278
*/
279279
public static int copy(
280280
final Reader input,
@@ -300,10 +300,10 @@ public static int copy(
300300
* This method uses the virtual machine's {@linkplain Charset#defaultCharset() default charset} for byte-to-char conversion.
301301
* </p>
302302
*
303-
* @param input the {@link String} to read from
304-
* @param output the {@link OutputStream} to write to
305-
* @throws IOException In case of an I/O problem
306-
* @deprecated Use {@link #copy(String, OutputStream, String)} instead
303+
* @param input the {@link String} to read from.
304+
* @param output the {@link OutputStream} to write to.
305+
* @throws IOException In case of an I/O problem.
306+
* @deprecated Use {@link #copy(String, OutputStream, String)} instead.
307307
*/
308308
@Deprecated
309309
public static void copy(
@@ -324,12 +324,12 @@ public static void copy(
324324
* {@link OutputStream}, and
325325
* flush the {@link OutputStream}.
326326
*
327-
* @param input the {@link String} to read from
328-
* @param output the {@link OutputStream} to write to
327+
* @param input the {@link String} to read from.
328+
* @param output the {@link OutputStream} to write to.
329329
* @param encoding The name of a supported character encoding. See the
330330
* <a href="https://www.iana.org/assignments/character-sets">IANA
331331
* Charset Registry</a> for a list of valid encoding types.
332-
* @throws IOException In case of an I/O problem
332+
* @throws IOException In case of an I/O problem.
333333
* @since 2.5
334334
*/
335335
public static void copy(
@@ -348,9 +348,9 @@ public static void copy(
348348
/**
349349
* Copies chars from a {@link String} to a {@link Writer}.
350350
*
351-
* @param input the {@link String} to read from
352-
* @param output the {@link Writer} to write to
353-
* @throws IOException In case of an I/O problem
351+
* @param input the {@link String} to read from.
352+
* @param output the {@link Writer} to write to.
353+
* @throws IOException In case of an I/O problem.
354354
*/
355355
public static void copy(final String input, final Writer output)
356356
throws IOException {

0 commit comments

Comments
 (0)