Skip to content

Commit 5e5f4ab

Browse files
authored
Spelling (#468)
* spelling: actual Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: adapter Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: bufin Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: compatibility Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: creator Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: expected Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: in Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: inline Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: necessary Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: non-existent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: noseparator Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: output Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: reader constructor Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: reuse Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: thread Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: timestamped Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
1 parent 06fde31 commit 5e5f4ab

18 files changed

Lines changed: 76 additions & 76 deletions

RELEASE-NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ Enhancements from 1.0
17471747
- LockableFileWriter - encoding support [36825]
17481748
Add support for character encodings to LockableFileWriter
17491749
Improve the validation
1750-
Create directories if necesssary
1750+
Create directories if necessary
17511751

17521752
- IOUtils and EndianUtils are no longer final [28978]
17531753
Allows developers to have subclasses if desired

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ private static String getSystemProperty(final String property) {
215215
* (this.codePointAt(<i>k</i>) == searchChar) &amp;&amp; (<i>k</i> &gt;= start)
216216
* </pre></blockquote>
217217
* <p>
218-
* is true. In either case, if no such character occurs inm {@code cs}
218+
* is true. In either case, if no such character occurs in {@code cs}
219219
* at or after position {@code start}, then
220220
* {@code -1} is returned.
221221
* </p>

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,8 @@ public static void copyURLToFile(final URL source, final File destination, final
10881088
}
10891089

10901090
/**
1091-
* Creates all parent directories for a File object, including any necessary but nonexistent parent directories. If a parent directory already exists or is
1092-
* null, nothing happens.
1091+
* Creates all parent directories for a File object, including any necessary but non-existent parent directories. If a parent directory already exists or
1092+
* is null, nothing happens.
10931093
*
10941094
* @param file the File that may need parents, may be null.
10951095
* @return The parent directory, or {@code null} if the given File does have a parent.
@@ -1281,7 +1281,7 @@ public static boolean directoryContains(final File directory, final File child)
12811281

12821282
/**
12831283
* Internal copy directory method. Creates all destination parent directories,
1284-
* including any necessary but nonexistent parent directories.
1284+
* including any necessary but non-existent parent directories.
12851285
*
12861286
* @param srcDir the validated source directory, must not be {@code null}.
12871287
* @param destDir the validated destination directory, must not be {@code null}.
@@ -1364,7 +1364,7 @@ public static void forceDeleteOnExit(final File file) throws IOException {
13641364
}
13651365

13661366
/**
1367-
* Creates all directories for a File object, including any necessary but nonexistent parent directories. If the {@code directory} already exists or is
1367+
* Creates all directories for a File object, including any necessary but non-existent parent directories. If the {@code directory} already exists or is
13681368
* null, nothing happens.
13691369
* <p>
13701370
* Calls {@link File#mkdirs()} and throws an {@link IOException} on failure.
@@ -1381,8 +1381,8 @@ public static void forceMkdir(final File directory) throws IOException {
13811381
}
13821382

13831383
/**
1384-
* Creates all directories for a File object, including any necessary but nonexistent parent directories. If the parent directory already exists or is null,
1385-
* nothing happens.
1384+
* Creates all directories for a File object, including any necessary but non-existent parent directories. If the parent directory already exists or is
1385+
* null, nothing happens.
13861386
* <p>
13871387
* Calls {@link File#mkdirs()} for the parent of @{code file}.
13881388
* </p>
@@ -2270,7 +2270,7 @@ public static Collection<File> listFilesAndDirs(final File directory, final IOFi
22702270
/**
22712271
* Calls {@link File#mkdirs()} and throws an {@link IOException} on failure.
22722272
* <p>
2273-
* Creates all directories for a File object, including any necessary but nonexistent parent directories. If the {@code directory} already exists or is
2273+
* Creates all directories for a File object, including any necessary but non-existent parent directories. If the {@code directory} already exists or is
22742274
* null, nothing happens.
22752275
* </p>
22762276
*
@@ -2322,7 +2322,7 @@ public static void moveDirectory(final File srcDir, final File destDir) throws I
23222322
/**
23232323
* Moves a directory to another directory.
23242324
* <p>
2325-
* If {@code createDestDir} is true, creates all destination parent directories, including any necessary but nonexistent parent directories.
2325+
* If {@code createDestDir} is true, creates all destination parent directories, including any necessary but non-existent parent directories.
23262326
* </p>
23272327
*
23282328
* @param source the file to be moved.
@@ -2407,7 +2407,7 @@ public static void moveFile(final File srcFile, final File destFile, final CopyO
24072407
/**
24082408
* Moves a file to a directory.
24092409
* <p>
2410-
* If {@code createDestDir} is true, creates all destination parent directories, including any necessary but nonexistent parent directories.
2410+
* If {@code createDestDir} is true, creates all destination parent directories, including any necessary but non-existent parent directories.
24112411
* </p>
24122412
*
24132413
* @param srcFile the file to be moved.
@@ -2436,7 +2436,7 @@ public static void moveFileToDirectory(final File srcFile, final File destDir, f
24362436
/**
24372437
* Moves a file or directory to a destination directory.
24382438
* <p>
2439-
* If {@code createDestDir} is true, creates all destination parent directories, including any necessary but nonexistent parent directories.
2439+
* If {@code createDestDir} is true, creates all destination parent directories, including any necessary but non-existent parent directories.
24402440
* </p>
24412441
* <p>
24422442
* When the destination is on another file system, do a "copy and delete".

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ protected OpenOption[] getOpenOptions() {
163163
*
164164
* @return An OutputStream
165165
* @throws IOException if an I/O error occurs.
166-
* @throws UnsupportedOperationException if the origin cannot be converted to an OututStream.
166+
* @throws UnsupportedOperationException if the origin cannot be converted to an OutputStream.
167167
* @throws IllegalStateException if the {@code origin} is {@code null}.
168168
* @see AbstractOrigin#getOutputStream(OpenOption...)
169169
* @since 2.13.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public int read() {
204204
return value == null ? EOF : 0xFF & value;
205205
} catch (final InterruptedException e) {
206206
Thread.currentThread().interrupt();
207-
// throw runtime unchecked exception to maintain signature backward-compatibilty of
207+
// throw runtime unchecked exception to maintain signature backward-compatibility of
208208
// this read method, which does not declare IOException
209209
throw new IllegalStateException(e);
210210
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
* </p>
3131
*
3232
* <pre>
33-
* final TimestampedObserver timetampedObserver = new TimestampedObserver();
33+
* final TimestampedObserver timestampedObserver = new TimestampedObserver();
3434
* try (ObservableInputStream inputStream = new ObservableInputStream(...),
35-
* timetampedObserver)) {
35+
* timestampedObserver)) {
3636
* ...
3737
* }
38-
* System.out.printf("IO duration: %s%n", timetampedObserver.getOpenToCloseDuration());
38+
* System.out.printf("IO duration: %s%n", timestampedObserver.getOpenToCloseDuration());
3939
* </pre>
4040
*
4141
* @since 2.9.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static class Builder extends AbstractStreamBuilder<ChunkedOutputStream, B
6868
*
6969
* @return a new instance.
7070
* @throws IOException if an I/O error occurs.
71-
* @throws UnsupportedOperationException if the origin cannot be converted to an OututStream.
71+
* @throws UnsupportedOperationException if the origin cannot be converted to an OutputStream.
7272
* @see #getOutputStream()
7373
*/
7474
@Override

src/test/java/org/apache/commons/io/FileUtilsCleanSymlinksTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,16 @@ public void testIdentifiesBrokenSymlinkFile() throws Exception {
192192
return;
193193
}
194194

195-
final File noexistFile = new File(top, "noexist");
195+
final File nonExistentFile = new File(top, "non-existent");
196196
final File symlinkFile = new File(top, "fakeinner");
197197
final File badSymlinkInPathFile = new File(symlinkFile, "fakeinner");
198-
final File noexistParentFile = new File("noexist", "file");
198+
final File nonExistentParentFile = new File("non-existent", "file");
199199

200-
assertTrue(setupSymlink(noexistFile, symlinkFile));
200+
assertTrue(setupSymlink(nonExistentFile, symlinkFile));
201201

202202
assertTrue(FileUtils.isSymlink(symlinkFile));
203-
assertFalse(FileUtils.isSymlink(noexistFile));
204-
assertFalse(FileUtils.isSymlink(noexistParentFile));
203+
assertFalse(FileUtils.isSymlink(nonExistentFile));
204+
assertFalse(FileUtils.isSymlink(nonExistentParentFile));
205205
assertFalse(FileUtils.isSymlink(badSymlinkInPathFile));
206206
}
207207

src/test/java/org/apache/commons/io/FileUtilsTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ public boolean renameTo(final File dest) {
21012101
public void testMoveDirectory_Errors() throws Exception {
21022102
assertThrows(NullPointerException.class, () -> FileUtils.moveDirectory(null, new File("foo")));
21032103
assertThrows(NullPointerException.class, () -> FileUtils.moveDirectory(new File("foo"), null));
2104-
assertThrows(FileNotFoundException.class, () -> FileUtils.moveDirectory(new File("nonexistant"), new File("foo")));
2104+
assertThrows(FileNotFoundException.class, () -> FileUtils.moveDirectory(new File("non-existent"), new File("foo")));
21052105

21062106
final File testFile = new File(tempDirFile, "testMoveDirectoryFile");
21072107
if (!testFile.getParentFile().exists()) {
@@ -2201,8 +2201,8 @@ public void testMoveDirectoryToDirectory_Errors() throws Exception {
22012201
}
22022202
assertThrows(IOException.class, () -> FileUtils.moveDirectoryToDirectory(testFile1, testFile2, true));
22032203

2204-
final File nonexistant = new File(tempDirFile, "testMoveFileNonExistant");
2205-
assertThrows(IOException.class, () -> FileUtils.moveDirectoryToDirectory(testFile1, nonexistant, false));
2204+
final File nonExistent = new File(tempDirFile, "testMoveFileNonExistent");
2205+
assertThrows(IOException.class, () -> FileUtils.moveDirectoryToDirectory(testFile1, nonExistent, false));
22062206
}
22072207

22082208
@Test
@@ -2316,7 +2316,7 @@ public boolean renameTo(final File f) {
23162316
public void testMoveFile_Errors() throws Exception {
23172317
assertThrows(NullPointerException.class, () -> FileUtils.moveFile(null, new File("foo")));
23182318
assertThrows(NullPointerException.class, () -> FileUtils.moveFile(new File("foo"), null));
2319-
assertThrows(FileNotFoundException.class, () -> FileUtils.moveFile(new File("nonexistant"), new File("foo")));
2319+
assertThrows(FileNotFoundException.class, () -> FileUtils.moveFile(new File("non-existent"), new File("foo")));
23202320
assertThrows(IllegalArgumentException.class, () -> FileUtils.moveFile(tempDirFile, new File("foo")));
23212321
final File testSourceFile = new File(tempDirFile, "testMoveFileSource");
23222322
final File testDestFile = new File(tempDirFile, "testMoveFileSource");
@@ -2384,8 +2384,8 @@ public void testMoveFileToDirectory_Errors() throws Exception {
23842384
}
23852385
assertThrows(IllegalArgumentException.class, () -> FileUtils.moveFileToDirectory(testFile1, testFile2, true));
23862386

2387-
final File nonexistant = new File(tempDirFile, "testMoveFileNonExistant");
2388-
assertThrows(IOException.class, () -> FileUtils.moveFileToDirectory(testFile1, nonexistant, false));
2387+
final File nonExistent = new File(tempDirFile, "testMoveFileNonExistent");
2388+
assertThrows(IOException.class, () -> FileUtils.moveFileToDirectory(testFile1, nonExistent, false));
23892389
}
23902390

23912391
@Test
@@ -2426,9 +2426,9 @@ public void testMoveToDirectory() throws Exception {
24262426
public void testMoveToDirectory_Errors() throws Exception {
24272427
assertThrows(NullPointerException.class, () -> FileUtils.moveDirectoryToDirectory(null, new File("foo"), true));
24282428
assertThrows(NullPointerException.class, () -> FileUtils.moveDirectoryToDirectory(new File("foo"), null, true));
2429-
final File nonexistant = new File(tempDirFile, "nonexistant");
2429+
final File nonExistent = new File(tempDirFile, "non-existent");
24302430
final File destDir = new File(tempDirFile, "MoveToDirectoryDestDir");
2431-
assertThrows(IOException.class, () -> FileUtils.moveToDirectory(nonexistant, destDir, true), "Expected IOException when source does not exist");
2431+
assertThrows(IOException.class, () -> FileUtils.moveToDirectory(nonExistent, destDir, true), "Expected IOException when source does not exist");
24322432

24332433
}
24342434

@@ -2592,7 +2592,7 @@ public void testSizeOfDirectoryAsBigInteger() throws Exception {
25922592
file.delete();
25932593
file.mkdir();
25942594

2595-
final File nonEmptyFile = new File(file, "nonEmptyFile" + System.nanoTime());
2595+
final File nonEmptyFile = new File(file, "non-emptyFile" + System.nanoTime());
25962596
assertTrue(nonEmptyFile.getParentFile().exists(), () -> "Cannot create file " + nonEmptyFile + " as the parent directory does not exist");
25972597
final OutputStream output = new BufferedOutputStream(Files.newOutputStream(nonEmptyFile.toPath()));
25982598
try {

src/test/java/org/apache/commons/io/FilenameUtilsTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public void testEqualsOnSystem() {
218218
@Test
219219
public void testGetBaseName() {
220220
assertNull(FilenameUtils.getBaseName(null));
221-
assertEquals("noseperator", FilenameUtils.getBaseName("noseperator.inthispath"));
221+
assertEquals("noseparator", FilenameUtils.getBaseName("noseparator.inthispath"));
222222
assertEquals("c", FilenameUtils.getBaseName("a/b/c.txt"));
223223
assertEquals("c", FilenameUtils.getBaseName("a/b/c"));
224224
assertEquals("", FilenameUtils.getBaseName("a/b/c/"));
@@ -264,7 +264,7 @@ public void testGetExtension() {
264264
@Test
265265
public void testGetFullPath() {
266266
assertNull(FilenameUtils.getFullPath(null));
267-
assertEquals("", FilenameUtils.getFullPath("noseperator.inthispath"));
267+
assertEquals("", FilenameUtils.getFullPath("noseparator.inthispath"));
268268
assertEquals("a/b/", FilenameUtils.getFullPath("a/b/c.txt"));
269269
assertEquals("a/b/", FilenameUtils.getFullPath("a/b/c"));
270270
assertEquals("a/b/c/", FilenameUtils.getFullPath("a/b/c/"));
@@ -306,7 +306,7 @@ public void testGetFullPath() {
306306
@Test
307307
public void testGetFullPathNoEndSeparator() {
308308
assertNull(FilenameUtils.getFullPathNoEndSeparator(null));
309-
assertEquals("", FilenameUtils.getFullPathNoEndSeparator("noseperator.inthispath"));
309+
assertEquals("", FilenameUtils.getFullPathNoEndSeparator("noseparator.inthispath"));
310310
assertEquals("a/b", FilenameUtils.getFullPathNoEndSeparator("a/b/c.txt"));
311311
assertEquals("a/b", FilenameUtils.getFullPathNoEndSeparator("a/b/c"));
312312
assertEquals("a/b/c", FilenameUtils.getFullPathNoEndSeparator("a/b/c/"));
@@ -367,7 +367,7 @@ public void testGetFullPathNoEndSeparator_IO_248() {
367367
@Test
368368
public void testGetName() {
369369
assertNull(FilenameUtils.getName(null));
370-
assertEquals("noseperator.inthispath", FilenameUtils.getName("noseperator.inthispath"));
370+
assertEquals("noseparator.inthispath", FilenameUtils.getName("noseparator.inthispath"));
371371
assertEquals("c.txt", FilenameUtils.getName("a/b/c.txt"));
372372
assertEquals("c", FilenameUtils.getName("a/b/c"));
373373
assertEquals("", FilenameUtils.getName("a/b/c/"));
@@ -377,9 +377,9 @@ public void testGetName() {
377377
@Test
378378
public void testGetPath() {
379379
assertNull(FilenameUtils.getPath(null));
380-
assertEquals("", FilenameUtils.getPath("noseperator.inthispath"));
381-
assertEquals("", FilenameUtils.getPath("/noseperator.inthispath"));
382-
assertEquals("", FilenameUtils.getPath("\\noseperator.inthispath"));
380+
assertEquals("", FilenameUtils.getPath("noseparator.inthispath"));
381+
assertEquals("", FilenameUtils.getPath("/noseparator.inthispath"));
382+
assertEquals("", FilenameUtils.getPath("\\noseparator.inthispath"));
383383
assertEquals("a/b/", FilenameUtils.getPath("a/b/c.txt"));
384384
assertEquals("a/b/", FilenameUtils.getPath("a/b/c"));
385385
assertEquals("a/b/c/", FilenameUtils.getPath("a/b/c/"));
@@ -420,9 +420,9 @@ public void testGetPath_with_null_character() {
420420
@Test
421421
public void testGetPathNoEndSeparator() {
422422
assertNull(FilenameUtils.getPath(null));
423-
assertEquals("", FilenameUtils.getPath("noseperator.inthispath"));
424-
assertEquals("", FilenameUtils.getPathNoEndSeparator("/noseperator.inthispath"));
425-
assertEquals("", FilenameUtils.getPathNoEndSeparator("\\noseperator.inthispath"));
423+
assertEquals("", FilenameUtils.getPath("noseparator.inthispath"));
424+
assertEquals("", FilenameUtils.getPathNoEndSeparator("/noseparator.inthispath"));
425+
assertEquals("", FilenameUtils.getPathNoEndSeparator("\\noseparator.inthispath"));
426426
assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("a/b/c.txt"));
427427
assertEquals("a/b", FilenameUtils.getPathNoEndSeparator("a/b/c"));
428428
assertEquals("a/b/c", FilenameUtils.getPathNoEndSeparator("a/b/c/"));
@@ -601,7 +601,7 @@ public void testIndexOfExtension() {
601601
@Test
602602
public void testIndexOfLastSeparator() {
603603
assertEquals(-1, FilenameUtils.indexOfLastSeparator(null));
604-
assertEquals(-1, FilenameUtils.indexOfLastSeparator("noseperator.inthispath"));
604+
assertEquals(-1, FilenameUtils.indexOfLastSeparator("noseparator.inthispath"));
605605
assertEquals(3, FilenameUtils.indexOfLastSeparator("a/b/c"));
606606
assertEquals(3, FilenameUtils.indexOfLastSeparator("a\\b\\c"));
607607
}

0 commit comments

Comments
 (0)