Skip to content

Commit c8dcd5e

Browse files
authored
(chore) Fix minor typos (#367)
Fix various minor typos in : - project documentations, - javadoc and comments, - private field, constant or method names, - method attribute and variable names, - test class and method names, - exception messages.
1 parent 4e24535 commit c8dcd5e

73 files changed

Lines changed: 209 additions & 209 deletions

File tree

Some content is hidden

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

RELEASE-NOTES.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ o Remove IOException from the method signatures that no longer throw IO
4242

4343
Changes:
4444
o Add SymbolicLinkFileFilter. Thanks to Gary Gregory.
45-
o Add test to make sure the setter of AndFileFilter works correctly #244. Thanks to trncate.
45+
o Add test to make sure the setter of AndFileFilter works correctly #244. Thanks to trncate.
4646
o Add XmlStreamReader(Path). Thanks to Gary Gregory.
4747
o Bump mockito-inline from 3.11.0 to 3.11.2 #247. Thanks to Dependabot.
4848
o Bump jmh.version from 1.27 to 1.32 #237. Thanks to Dependabot.
@@ -287,7 +287,7 @@ o IO-662: Refactor ByteArrayOutputStream into synchronized and unsynchronized v
287287

288288
Fixed Bugs:
289289
o IO-589: Some tests fail if the base path contains a space.
290-
o IO-582: Make methods in ObservableInputStream.Obsever public. Thanks to Bruno Palos.
290+
o IO-582: Make methods in ObservableInputStream.Observer public. Thanks to Bruno Palos.
291291
o IO-535: Thread bug in FileAlterationMonitor.stop(int). Thanks to Svetlin Zarev, Anthony Raymond.
292292
o IO-557: Perform locale independent upper case conversions. Thanks to luccioman.
293293
o IO-570: Missing Javadoc in FilenameUtils causing Travis-CI build to fail. Thanks to Pranet Verma.
@@ -554,7 +554,7 @@ o IO-338: When a file is rotated, finish reading previous file prior to startin
554554
o IO-354: Commons IO Tailer does not respect UTF-8 Charset.
555555
o IO-323: What should happen in FileUtils.sizeOf[Directory] when an overflow takes place?
556556
Added Javadoc.
557-
o IO-372: FileUtils.moveDirectory can produce misleading error message on failiure
557+
o IO-372: FileUtils.moveDirectory can produce misleading error message on failure
558558
o IO-362: IOUtils.contentEquals* methods returns false if input1 == input2, should return true. Thanks to mmadson, ggregory.
559559
o IO-357: [Tailer] InterruptedException while the thread is sleeping is silently ignored Thanks to mortenh.
560560
o IO-352: Spelling fixes. Thanks to scop.
@@ -671,7 +671,7 @@ Apache Commons IO Version 2.2
671671
Changes in this version include:
672672

673673
New features:
674-
o Add IOUTils.toBufferedReader(Reader) Issue: IO-313. Thanks to ggregory.
674+
o Add IOUtils.toBufferedReader(Reader) Issue: IO-313. Thanks to ggregory.
675675
o Allow applications to provide buffer (or size) for copyLarge methods. Issue: IO-308. Thanks to Manoj Mokashi.
676676
o New copyLarge() method in IOUtils that takes additional offset, length arguments Issue: IO-305. Thanks to Manoj Mokashi.
677677
o Use terabyte (TB), petabyte (PB) and exabyte (EB) in FileUtils.byteCountToDisplaySize(long size) Issue: IO-287. Thanks to Ron Kuris, Gary Gregory.
@@ -855,7 +855,7 @@ Bug fixes from 1.4
855855
* [IO-207] FileUtils - fix race condition in forceMkdir() method
856856
* [IO-217] FileUtils - fix copyDirectoryToDirectory() makes infinite loops
857857
* [IO-166] FileUtils - fix URL decoding in toFile(URL)
858-
* [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on sub-directories
858+
* [IO-190] FileUtils - fix copyDirectory not preserving lastmodified date on subdirectories
859859
* [IO-240] FileFilterUtils - ensure cvsFilter and svnFilter are only created once.
860860
* [IO-175] IOUtils - fix copyFile() issues with very large files
861861
* [IO-191] Improvements from static analysis
@@ -933,7 +933,7 @@ Enhancements from 1.3.2
933933
- Add new Reader implementation that handles any CharSequence (String,
934934
StringBuffer, StringBuilder or CharBuffer)
935935

936-
- ThesholdingOuputStream [IO-121]
936+
- ThresholdingOutputStream [IO-121]
937937
- Add a reset() method which sets the count of the bytes written back to zero.
938938

939939
- DeferredFileOutputStream [IO-130]
@@ -952,10 +952,10 @@ Enhancements from 1.3.2
952952
- Add Singleton Constants to several stream classes [IO-143]
953953

954954
- PrefixFileFilter [IO-126]
955-
- Add faciltiy to specify case sensitivity on prefix matching
955+
- Add facility to specify case sensitivity on prefix matching
956956

957957
- SuffixFileFilter [IO-126]
958-
- Add faciltiy to specify case sensitivity on suffix matching
958+
- Add facility to specify case sensitivity on suffix matching
959959

960960
- RegexFileFilter [IO-74]
961961
- Add new regular expression file filter implementation
@@ -1105,7 +1105,7 @@ Bug fixes from 1.2
11051105
- Added a new copyLarge(Reader, Writer) method that returns a long
11061106

11071107
- CountingInputStream/CountingOutputStream [IO-84]
1108-
- Methods were declared as int thus the count was innacurate for large streams
1108+
- Methods were declared as int thus the count was inaccurate for large streams
11091109
- new long based methods getByteCount()/resetByteCount() added
11101110
- existing methods changed to throw an exception if the count is greater than an int
11111111

@@ -1166,7 +1166,7 @@ Enhancements from 1.2
11661166
- FileDeleteStrategy
11671167
- FileCleaner [IO-56,IO-70]
11681168
- FileDeleteStrategy is a strategy for handling file deletion
1169-
- This can be used as a calback in FileCleaner
1169+
- This can be used as a callback in FileCleaner
11701170
- Together these allow FileCleaner to do a forceDelete to kill directories
11711171

11721172
- FileCleaner.exitWhenFinished [IO-99]
@@ -1296,7 +1296,7 @@ Semantic compatible - Yes, except:
12961296
Generally this will make no difference
12971297

12981298
- LockableFileWriter
1299-
Improved validation and now create directories if necesssary
1299+
Improved validation and now create directories if necessary
13001300

13011301
plus these bug fixes may affect you semantically:
13021302
- FileUtils.touch() (Bug fix 29821)
@@ -1367,7 +1367,7 @@ Enhancements from 1.0
13671367
- IOUtils - toCharArray(InputStream) [28979]
13681368
- toCharArray(InputStream,encoding)
13691369
- toCharArray(Reader)
1370-
Reads a stream/reader into a charatcter array
1370+
Reads a stream/reader into a character array
13711371

13721372
- IOUtils - readLines(InputStream) [36214]
13731373
- readLines(InputStream,encoding)

src/changes/changes.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ The <action> type attribute can be add,update,fix,remove.
937937
Adding the CircularBufferInputStream, and the PeekableInputStream.
938938
</action>
939939
<action issue="IO-582" dev="jochen" type="fix" due-to="Bruno Palos">
940-
Make methods in ObservableInputStream.Obsever public.
940+
Make methods in ObservableInputStream.Observer public.
941941
</action>
942942
<action issue="IO-535" dev="pschumacher" type="fix" due-to="Svetlin Zarev, Anthony Raymond">
943943
Thread bug in FileAlterationMonitor#stop(int).
@@ -1304,7 +1304,7 @@ The <action> type attribute can be add,update,fix,remove.
13041304
Added ChunkedOutputStream, ChunkedWriter
13051305
</action>
13061306
<action issue="IO-385" dev="sebb" type="fix">
1307-
FileUtils.doCopyFile can potentially loop for ever
1307+
FileUtils.doCopyFile can potentially loop forever
13081308
Exit loop if no data to copy
13091309
</action>
13101310
<action issue="IO-383" dev="sebb" type="fix">
@@ -1373,7 +1373,7 @@ The <action> type attribute can be add,update,fix,remove.
13731373
Added Javadoc.
13741374
</action>
13751375
<action issue="IO-372" dev="sebb" type="fix">
1376-
FileUtils.moveDirectory can produce misleading error message on failiure
1376+
FileUtils.moveDirectory can produce misleading error message on failure
13771377
</action>
13781378
<action issue="IO-375" dev="sebb" type="update">
13791379
FilenameUtils.splitOnTokens(String text) check for '**' could be simplified
@@ -1490,7 +1490,7 @@ The <action> type attribute can be add,update,fix,remove.
14901490

14911491
<release version="2.2" date="2012-March-26" description="New features and bug fixes.">
14921492
<action issue="IO-313" dev="ggregory" type="add" due-to="ggregory">
1493-
Add IOUTils.toBufferedReader(Reader)
1493+
Add IOUtils.toBufferedReader(Reader)
14941494
</action>
14951495
<!-- Note: the issue was not raised by Manoj, but arose from IO-305 and tests he performed -->
14961496
<action issue="IO-308" dev="sebb" type="add" due-to="Manoj Mokashi">

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ public int hashCode() {
223223
}
224224

225225
@Override
226-
public void setAllowUserInteraction(final boolean allowuserinteraction) {
227-
urlConnection.setAllowUserInteraction(allowuserinteraction);
226+
public void setAllowUserInteraction(final boolean allowUserInteraction) {
227+
urlConnection.setAllowUserInteraction(allowUserInteraction);
228228
}
229229

230230
@Override
@@ -233,23 +233,23 @@ public void setConnectTimeout(final int timeout) {
233233
}
234234

235235
@Override
236-
public void setDefaultUseCaches(final boolean defaultusecaches) {
237-
urlConnection.setDefaultUseCaches(defaultusecaches);
236+
public void setDefaultUseCaches(final boolean defaultUseCaches) {
237+
urlConnection.setDefaultUseCaches(defaultUseCaches);
238238
}
239239

240240
@Override
241-
public void setDoInput(final boolean doinput) {
242-
urlConnection.setDoInput(doinput);
241+
public void setDoInput(final boolean doInput) {
242+
urlConnection.setDoInput(doInput);
243243
}
244244

245245
@Override
246-
public void setDoOutput(final boolean dooutput) {
247-
urlConnection.setDoOutput(dooutput);
246+
public void setDoOutput(final boolean doOutput) {
247+
urlConnection.setDoOutput(doOutput);
248248
}
249249

250250
@Override
251-
public void setIfModifiedSince(final long ifmodifiedsince) {
252-
urlConnection.setIfModifiedSince(ifmodifiedsince);
251+
public void setIfModifiedSince(final long ifModifiedSince) {
252+
urlConnection.setIfModifiedSince(ifModifiedSince);
253253
}
254254

255255
@Override
@@ -263,8 +263,8 @@ public void setRequestProperty(final String key, final String value) {
263263
}
264264

265265
@Override
266-
public void setUseCaches(final boolean usecaches) {
267-
urlConnection.setUseCaches(usecaches);
266+
public void setUseCaches(final boolean useCaches) {
267+
urlConnection.setUseCaches(useCaches);
268268
}
269269

270270
@Override

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public static long readSwappedUnsignedInteger(final byte[] data, final int offse
196196
}
197197

198198
/**
199-
* Reads a unsigned integer (32-bit) from an InputStream. The value is
199+
* Reads an unsigned integer (32-bit) from an InputStream. The value is
200200
* converted to the opposed endian system while reading.
201201
* @param input source InputStream
202202
* @return the value just read
@@ -226,7 +226,7 @@ public static int readSwappedUnsignedShort(final byte[] data, final int offset)
226226
}
227227

228228
/**
229-
* Reads a unsigned short (16-bit) from an InputStream. The value is
229+
* Reads an unsigned short (16-bit) from an InputStream. The value is
230230
* converted to the opposed endian system while reading.
231231
* @param input source InputStream
232232
* @return the value just read

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ private static String replace(final String path, final char oldChar, final char
311311
/**
312312
* Constructs a new instance.
313313
*
314-
* @param caseSensitive Whether this file system is case sensitive.
315-
* @param casePreserving Whether this file system is case preserving.
314+
* @param caseSensitive Whether this file system is case-sensitive.
315+
* @param casePreserving Whether this file system is case-preserving.
316316
* @param maxFileLength The maximum length for file names. The file name does not include folders.
317317
* @param maxPathLength The maximum length of the path to a file. This can include folders.
318318
* @param illegalFileNameChars Illegal characters for this file system.
@@ -511,4 +511,4 @@ CharSequence trimExtension(final CharSequence cs) {
511511
final int index = indexOf(cs, '.', 0);
512512
return index < 0 ? cs : cs.subSequence(0, index);
513513
}
514-
}
514+
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public static long freeSpaceKb(final long timeout) throws IOException {
188188
* The free space is calculated via the command line.
189189
* It uses 'dir /-c' on Windows, 'df -kP' on AIX/HP-UX and 'df -k' on other Unix.
190190
* <p>
191-
* In order to work, you must be running Windows, or have a implementation of
191+
* In order to work, you must be running Windows, or have an implementation of
192192
* Unix df that supports GNU format when passed -k (or -kP). If you are going
193193
* to rely on this code, please check that it works on your OS by running
194194
* some simple tests to compare the command line with the output from this class.
@@ -218,7 +218,7 @@ public static long freeSpaceKb(final String path) throws IOException {
218218
* The free space is calculated via the command line.
219219
* It uses 'dir /-c' on Windows, 'df -kP' on AIX/HP-UX and 'df -k' on other Unix.
220220
* <p>
221-
* In order to work, you must be running Windows, or have a implementation of
221+
* In order to work, you must be running Windows, or have an implementation of
222222
* Unix df that supports GNU format when passed -k (or -kP). If you are going
223223
* to rely on this code, please check that it works on your OS by running
224224
* some simple tests to compare the command line with the output from this class.
@@ -484,8 +484,8 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final Dura
484484
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4784692
485485
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4801027
486486
// http://forum.java.sun.com/thread.jspa?threadID=533029&messageID=2572018
487-
// however, its still not perfect as the JDK support is so poor
488-
// (see commons-exec or Ant for a better multi-threaded multi-os solution)
487+
// however, it's still not perfect as the JDK support is so poor
488+
// (see commons-exec or Ant for a better multithreaded multi-os solution)
489489

490490
final List<String> lines = new ArrayList<>(20);
491491
Process proc = null;

0 commit comments

Comments
 (0)