Skip to content

Commit effe551

Browse files
committed
Trailing spaces
These are the worst offenders; others remain with single spaces here and there git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1471767 13f79535-47bb-0310-9956-ffa450edef68
1 parent 09d8687 commit effe551

34 files changed

Lines changed: 694 additions & 694 deletions

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* Byte Order Mark (BOM) representation - see {@link org.apache.commons.io.input.BOMInputStream}.
23-
*
23+
*
2424
* @see org.apache.commons.io.input.BOMInputStream
2525
* @see <a href="http://en.wikipedia.org/wiki/Byte_order_mark">Wikipedia: Byte Order Mark</a>
2626
* @see <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#sec-guessing">W3C: Autodetection of Character Encodings
@@ -34,27 +34,27 @@ public class ByteOrderMark implements Serializable {
3434

3535
/** UTF-8 BOM */
3636
public static final ByteOrderMark UTF_8 = new ByteOrderMark("UTF-8", 0xEF, 0xBB, 0xBF);
37-
37+
3838
/** UTF-16BE BOM (Big-Endian) */
3939
public static final ByteOrderMark UTF_16BE = new ByteOrderMark("UTF-16BE", 0xFE, 0xFF);
40-
40+
4141
/** UTF-16LE BOM (Little-Endian) */
4242
public static final ByteOrderMark UTF_16LE = new ByteOrderMark("UTF-16LE", 0xFF, 0xFE);
4343

44-
/**
44+
/**
4545
* UTF-32BE BOM (Big-Endian)
46-
* @since 2.2
46+
* @since 2.2
4747
*/
4848
public static final ByteOrderMark UTF_32BE = new ByteOrderMark("UTF-32BE", 0x00, 0x00, 0xFE, 0xFF);
49-
50-
/**
49+
50+
/**
5151
* UTF-32LE BOM (Little-Endian)
52-
* @since 2.2
52+
* @since 2.2
5353
*/
5454
public static final ByteOrderMark UTF_32LE = new ByteOrderMark("UTF-32LE", 0xFF, 0xFE, 0x00, 0x00);
55-
55+
5656
/**
57-
* Unicode BOM character; external form depends on the encoding.
57+
* Unicode BOM character; external form depends on the encoding.
5858
* @see <a href="http://unicode.org/faq/utf_bom.html#BOM">Byte Order Mark (BOM) FAQ</a>
5959
* @since 2.5
6060
*/

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* The ASF licenses this file to You under the Apache License, Version 2.0
66
* (the "License"); you may not use this file except in compliance with
77
* the License. You may obtain a copy of the License at
8-
*
8+
*
99
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
10+
*
1111
* Unless required by applicable law or agreed to in writing, software
1212
* distributed under the License is distributed on an "AS IS" BASIS,
1313
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,14 +31,14 @@
3131
* <p>
3232
* This class operates with a {@link FileFilter} and maximum depth to
3333
* limit the files and direcories visited.
34-
* Commons IO supplies many common filter implementations in the
34+
* Commons IO supplies many common filter implementations in the
3535
* <a href="filefilter/package-summary.html"> filefilter</a> package.
3636
* <p>
3737
* The following sections describe:
3838
* <ul>
3939
* <li><a href="#example">1. Example Implementation</a> - example
4040
* <code>FileCleaner</code> implementation.</li>
41-
* <li><a href="#filter">2. Filter Example</a> - using
41+
* <li><a href="#filter">2. Filter Example</a> - using
4242
* {@link FileFilter}(s) with <code>DirectoryWalker</code>.</li>
4343
* <li><a href="#cancel">3. Cancellation</a> - how to implement cancellation
4444
* behaviour.</li>
@@ -104,20 +104,20 @@
104104
* super(filter, -1);
105105
* }
106106
* }
107-
*
107+
*
108108
* // Build up the filters and create the walker
109109
* // Create a filter for Non-hidden directories
110-
* IOFileFilter fooDirFilter =
110+
* IOFileFilter fooDirFilter =
111111
* FileFilterUtils.andFileFilter(FileFilterUtils.directoryFileFilter,
112112
* HiddenFileFilter.VISIBLE);
113113
*
114114
* // Create a filter for Files ending in ".txt"
115-
* IOFileFilter fooFileFilter =
115+
* IOFileFilter fooFileFilter =
116116
* FileFilterUtils.andFileFilter(FileFilterUtils.fileFileFilter,
117117
* FileFilterUtils.suffixFileFilter(".txt"));
118118
*
119119
* // Combine the directory and file filters using an OR condition
120-
* java.io.FileFilter fooFilter =
120+
* java.io.FileFilter fooFilter =
121121
* FileFilterUtils.orFileFilter(fooDirFilter, fooFileFilter);
122122
*
123123
* // Use the filter to construct a DirectoryWalker implementation
@@ -138,7 +138,7 @@
138138
* super(dirFilter, fileFilter, -1);
139139
* }
140140
* }
141-
*
141+
*
142142
* // Use the filters to construct the walker
143143
* FooDirectoryWalker walker = new FooDirectoryWalker(
144144
* HiddenFileFilter.VISIBLE,
@@ -174,7 +174,7 @@
174174
* <ul>
175175
* <li><a href="#external">3.1 External / Mult-threaded</a> - cancellation being
176176
* decided/initiated by an external process.</li>
177-
* <li><a href="#internal">3.2 Internal</a> - cancellation being decided/initiated
177+
* <li><a href="#internal">3.2 Internal</a> - cancellation being decided/initiated
178178
* from within a DirectoryWalker implementation.</li>
179179
* </ul>
180180
* <p>
@@ -218,7 +218,7 @@
218218
*
219219
* This shows an example of how internal cancellation processing could be implemented.
220220
* <b>Note</b> the decision logic and throwing a {@link CancelException} could be implemented
221-
* in any of the <i>lifecycle</i> methods.
221+
* in any of the <i>lifecycle</i> methods.
222222
*
223223
* <pre>
224224
* public class BarDirectoryWalker extends DirectoryWalker {
@@ -384,7 +384,7 @@ private void walk(final File directory, final int depth, final Collection<T> res
384384
* automatically by the walk of the tree. However, sometimes a single method,
385385
* typically {@link #handleFile}, may take a long time to run. In that case,
386386
* you may wish to check for cancellation by calling this method.
387-
*
387+
*
388388
* @param file the current file being processed
389389
* @param depth the current file level (starting directory = 0)
390390
* @param results the collection of result objects, may be updated
@@ -447,7 +447,7 @@ protected boolean handleIsCancelled(
447447
* @param startDirectory the directory that the walk started from
448448
* @param results the collection of result objects, may be updated
449449
* @param cancel the exception throw to cancel further processing
450-
* containing details at the point of cancellation.
450+
* containing details at the point of cancellation.
451451
* @throws IOException if an I/O Error occurs
452452
*/
453453
protected void handleCancelled(final File startDirectory, final Collection<T> results,
@@ -583,7 +583,7 @@ public static class CancelException extends IOException {
583583

584584
/** Serialization id. */
585585
private static final long serialVersionUID = 1347339620135041008L;
586-
586+
587587
/** The file being processed when the exception was thrown. */
588588
private final File file;
589589
/** The file depth when the exception was thrown. */

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* The ASF licenses this file to You under the Apache License, Version 2.0
66
* (the "License"); you may not use this file except in compliance with
77
* the License. You may obtain a copy of the License at
8-
*
8+
*
99
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
10+
*
1111
* Unless required by applicable law or agreed to in writing, software
1212
* distributed under the License is distributed on an "AS IS" BASIS,
1313
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -121,7 +121,7 @@ public FileSystemUtils() {
121121
* of {@link #freeSpaceKb(String)} which returns a result in kilobytes.
122122
* <p>
123123
* Note that some OS's are NOT currently supported, including OS/390,
124-
* OpenVMS.
124+
* OpenVMS.
125125
* <pre>
126126
* FileSystemUtils.freeSpace("C:"); // Windows
127127
* FileSystemUtils.freeSpace("/volume"); // *nix
@@ -214,7 +214,7 @@ public static long freeSpaceKb(final String path, final long timeout) throws IOE
214214
* @since 2.0
215215
*/
216216
public static long freeSpaceKb() throws IOException {
217-
return freeSpaceKb(-1);
217+
return freeSpaceKb(-1);
218218
}
219219

220220
/**
@@ -232,9 +232,9 @@ public static long freeSpaceKb() throws IOException {
232232
* @since 2.0
233233
*/
234234
public static long freeSpaceKb(final long timeout) throws IOException {
235-
return freeSpaceKb(new File(".").getAbsolutePath(), timeout);
235+
return freeSpaceKb(new File(".").getAbsolutePath(), timeout);
236236
}
237-
237+
238238
//-----------------------------------------------------------------------
239239
/**
240240
* Returns the free space on a drive or volume in a cross-platform manner.
@@ -290,13 +290,13 @@ long freeSpaceWindows(String path, final long timeout) throws IOException {
290290
if (path.length() > 0 && path.charAt(0) != '"') {
291291
path = "\"" + path + "\"";
292292
}
293-
293+
294294
// build and run the 'dir' command
295295
final String[] cmdAttribs = new String[] {"cmd.exe", "/C", "dir /a /-c " + path};
296-
296+
297297
// read in the output of the command to an ArrayList
298298
final List<String> lines = performCommand(cmdAttribs, Integer.MAX_VALUE, timeout);
299-
299+
300300
// now iterate over the lines we just read and find the LAST
301301
// non-empty line (the free space bytes should be in the last element
302302
// of the ArrayList anyway, but this will ensure it works even if it's
@@ -354,7 +354,7 @@ long parseDir(final String line, final String path) throws IOException {
354354
"Command line 'dir /-c' did not return valid info " +
355355
"for path '" + path + "'");
356356
}
357-
357+
358358
// remove commas and dots in the bytes count
359359
final StringBuilder buf = new StringBuilder(line.substring(bytesStart, bytesEnd));
360360
for (int k = 0; k < buf.length(); k++) {
@@ -390,9 +390,9 @@ long freeSpaceUnix(final String path, final boolean kb, final boolean posix, fin
390390
if (posix) {
391391
flags += "P";
392392
}
393-
final String[] cmdAttribs =
393+
final String[] cmdAttribs =
394394
flags.length() > 1 ? new String[] {DF, flags, path} : new String[] {DF, path};
395-
395+
396396
// perform the command, asking for up to 3 lines (header, interesting, overflow)
397397
final List<String> lines = performCommand(cmdAttribs, 3, timeout);
398398
if (lines.size() < 2) {
@@ -402,7 +402,7 @@ long freeSpaceUnix(final String path, final boolean kb, final boolean posix, fin
402402
"for path '" + path + "'- response was " + lines);
403403
}
404404
final String line2 = lines.get(1); // the line we're interested in
405-
405+
406406
// Now, we tokenize the string. The fourth element is what we want.
407407
StringTokenizer tok = new StringTokenizer(line2, " ");
408408
if (tok.countTokens() < 4) {
@@ -427,7 +427,7 @@ long freeSpaceUnix(final String path, final boolean kb, final boolean posix, fin
427427
//-----------------------------------------------------------------------
428428
/**
429429
* Parses the bytes from a string.
430-
*
430+
*
431431
* @param freeSpace the free space string
432432
* @param path the path
433433
* @return the number of bytes
@@ -442,7 +442,7 @@ long parseBytes(final String freeSpace, final String path) throws IOException {
442442
"for path '" + path + "'- check path is valid");
443443
}
444444
return bytes;
445-
445+
446446
} catch (final NumberFormatException ex) {
447447
throw new IOExceptionWithCause(
448448
"Command line '" + DF + "' did not return numeric data as expected " +
@@ -469,7 +469,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final long
469469
// http://forum.java.sun.com/thread.jspa?threadID=533029&messageID=2572018
470470
// however, its still not perfect as the JDK support is so poor
471471
// (see commons-exec or Ant for a better multi-threaded multi-os solution)
472-
472+
473473
final List<String> lines = new ArrayList<String>(20);
474474
Process proc = null;
475475
InputStream in = null;
@@ -492,7 +492,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final long
492492
lines.add(line);
493493
line = inr.readLine();
494494
}
495-
495+
496496
proc.waitFor();
497497

498498
ThreadMonitor.stop(monitor);
@@ -510,7 +510,7 @@ List<String> performCommand(final String[] cmdAttribs, final int max, final long
510510
"for command " + Arrays.asList(cmdAttribs));
511511
}
512512
return lines;
513-
513+
514514
} catch (final InterruptedException ex) {
515515
throw new IOExceptionWithCause(
516516
"Command line threw an InterruptedException " +

0 commit comments

Comments
 (0)