Skip to content

Commit

Permalink
Javadoc: Use semantic tag <strong> instead of style tag <b>
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 15, 2024
1 parent 82a8ef1 commit 23b4ec6
Show file tree
Hide file tree
Showing 34 changed files with 79 additions and 78 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/io/DirectoryWalker.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
* <h3 id="internal">3.2 Internal</h3>
*
* <p>
* This shows an example of how internal cancellation processing could be implemented. <b>Note</b> the decision logic
* This shows an example of how internal cancellation processing could be implemented. <strong>Note</strong> the decision logic
* and throwing a {@link CancelException} could be implemented in any of the <em>lifecycle</em> methods.
* </p>
*
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/apache/commons/io/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final bo
* {@link File#setLastModified(long)}. However it is not guaranteed that those operations will succeed. If the
* modification operation fails, the method throws IOException.
* </p>
* <b>Example: Copy directories only</b>
* <strong>Example: Copy directories only</strong>
*
* <pre>
* // only copy the directory structure
* FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY);
* </pre>
*
* <b>Example: Copy directories and txt files</b>
* <strong>Example: Copy directories and txt files</strong>
*
* <pre>
* // Create a filter for ".txt" files
Expand Down Expand Up @@ -637,14 +637,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final Fi
* not guaranteed that the operation will succeed. If the modification operation fails it falls back to
* {@link File#setLastModified(long)}. If that fails, the method throws IOException.
* </p>
* <b>Example: Copy directories only</b>
* <strong>Example: Copy directories only</strong>
*
* <pre>
* // only copy the directory structure
* FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY, false);
* </pre>
*
* <b>Example: Copy directories and txt files</b>
* <strong>Example: Copy directories and txt files</strong>
*
* <pre>
* // Create a filter for ".txt" files
Expand Down Expand Up @@ -688,14 +688,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final Fi
* not guaranteed that the operation will succeed. If the modification operation fails it falls back to
* {@link File#setLastModified(long)}. If that fails, the method throws IOException.
* </p>
* <b>Example: Copy directories only</b>
* <strong>Example: Copy directories only</strong>
*
* <pre>
* // only copy the directory structure
* FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY, false);
* </pre>
*
* <b>Example: Copy directories and txt files</b>
* <strong>Example: Copy directories and txt files</strong>
*
* <pre>
* // Create a filter for ".txt" files
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/apache/commons/io/FilenameUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* This class aims to help avoid those problems.
* </p>
* <p>
* <b>NOTE</b>: You may be able to avoid using this class entirely simply by
* <strong>NOTE</strong>: You may be able to avoid using this class entirely simply by
* using JDK {@link File File} objects and the two argument constructor
* {@link File#File(java.io.File, String) File(File,String)}.
* </p>
Expand Down Expand Up @@ -634,7 +634,7 @@ public static String getBaseName(final String fileName) {
* exception of a possible {@link IllegalArgumentException} on Windows (see below).
* </p>
* <p>
* <b>Note:</b> This method used to have a hidden problem for names like "foo.exe:bar.txt".
* <strong>Note:</strong> This method used to have a hidden problem for names like "foo.exe:bar.txt".
* In this case, the name wouldn't be the name of a file, but the identifier of an
* alternate data stream (bar.txt) on the file foo.exe. The method used to return
* ".txt" here, which would be misleading. Commons IO 2.7 and later throw
Expand All @@ -644,7 +644,7 @@ public static String getBaseName(final String fileName) {
* @param fileName the file name to retrieve the extension of.
* @return the extension of the file or an empty string if none exists or {@code null}
* if the file name is {@code null}.
* @throws IllegalArgumentException <b>Windows only:</b> the file name parameter is, in fact,
* @throws IllegalArgumentException <strong>Windows only:</strong> the file name parameter is, in fact,
* the identifier of an Alternate Data Stream, for example "foo.exe:bar.txt".
*/
public static String getExtension(final String fileName) throws IllegalArgumentException {
Expand Down Expand Up @@ -972,7 +972,7 @@ public static int getPrefixLength(final String fileName) {
* The output will be the same irrespective of the machine that the code is running on, with the
* exception of a possible {@link IllegalArgumentException} on Windows (see below).
* </p>
* <b>Note:</b> This method used to have a hidden problem for names like "foo.exe:bar.txt".
* <strong>Note:</strong> This method used to have a hidden problem for names like "foo.exe:bar.txt".
* In this case, the name wouldn't be the name of a file, but the identifier of an
* alternate data stream (bar.txt) on the file foo.exe. The method used to return
* ".txt" here, which would be misleading. Commons IO 2.7, and later versions, are throwing
Expand All @@ -981,7 +981,7 @@ public static int getPrefixLength(final String fileName) {
* @param fileName
* the file name to find the last extension separator in, null returns -1
* @return the index of the last extension separator character, or -1 if there is no such character
* @throws IllegalArgumentException <b>Windows only:</b> the file name parameter is, in fact,
* @throws IllegalArgumentException <strong>Windows only:</strong> the file name parameter is, in fact,
* the identifier of an Alternate Data Stream, for example "foo.exe:bar.txt".
*/
public static int indexOfExtension(final String fileName) throws IllegalArgumentException {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/io/IOUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public static void closeQuietly(final Closeable closeable) {
* } catch (Exception e) {
* // error handling
* } finally {
* <b>IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception</b>
* <strong>IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception</strong>
* }
* </pre>
* <p>
Expand Down Expand Up @@ -2743,7 +2743,7 @@ public static byte[] toByteArray(final InputStream input, final int size) throws
* Gets contents of an {@link InputStream} as a {@code byte[]}.
* Use this method instead of {@link #toByteArray(InputStream)}
* when {@link InputStream} size is known.
* <b>NOTE:</b> the method checks that the length can safely be cast to an int without truncation
* <strong>NOTE:</strong> the method checks that the length can safely be cast to an int without truncation
* before using {@link IOUtils#toByteArray(InputStream, int)} to read into the byte array.
* (Arrays can have no more than Integer.MAX_VALUE entries anyway)
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/io/StreamIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class StreamIterator<E> implements Iterator<E>, AutoCloseable {
/**
* Wraps and presents a stream as a closable resource that automatically closes itself when reaching the end of stream.
* <p>
* <b>Warning</b>
* <strong>Warning</strong>
* </p>
* <p>
* In order to close the stream, the call site MUST either close the stream it allocated OR call this iterator until the end.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.Comparator;

/**
* Compares two files using the <b>default</b> {@link File#compareTo(File)} method.
* Compares two files using the <strong>default</strong> {@link File#compareTo(File)} method.
* <p>
* This comparator can be used to sort lists or arrays of files
* by using the default file comparison.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.apache.commons.io.IOCase;

/**
* Compare the file name <b>extensions</b> for order
* Compare the file name <strong>extensions</strong> for order
* (see {@link FilenameUtils#getExtension(String)}).
* <p>
* This comparator can be used to sort lists or arrays of files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.commons.io.FileUtils;

/**
* Compare the <b>last modified date/time</b> of two files for order
* Compare the <strong>last modified date/time</strong> of two files for order
* (see {@link FileUtils#lastModifiedUnchecked(File)}).
* <p>
* This comparator can be used to sort lists or arrays of files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.commons.io.IOCase;

/**
* Compare the <b>names</b> of two files for order (see {@link File#getName()}).
* Compare the <strong>names</strong> of two files for order (see {@link File#getName()}).
* <p>
* This comparator can be used to sort lists or arrays of files
* by their name either in a case-sensitive, case-insensitive or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.commons.io.IOCase;

/**
* Compare the <b>path</b> of two files for order (see {@link File#getPath()}).
* Compare the <strong>path</strong> of two files for order (see {@link File#getPath()}).
* <p>
* This comparator can be used to sort lists or arrays of files
* by their path either in a case-sensitive, case-insensitive or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.commons.io.FileUtils;

/**
* Compare the <b>length/size</b> of two files for order (see
* Compare the <strong>length/size</strong> of two files for order (see
* {@link File#length()} and {@link FileUtils#sizeOfDirectory(File)}).
* <p>
* This comparator can be used to sort lists or arrays of files
Expand All @@ -46,7 +46,7 @@
* ((AbstractFileComparator) SizeFileComparator.SIZE_REVERSE).sort(array);
* </pre>
* <p>
* <strong>N.B.</strong> Directories are treated as <b>zero size</b> unless
* <strong>N.B.</strong> Directories are treated as <strong>zero size</strong> unless
* {@code sumDirectoryContents} is {@code true}.
* </p>
* <h2>Deprecating Serialization</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
* AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new AgeFileFilter(cutoff));
* //
* // Walk one directoryectory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down Expand Up @@ -175,8 +175,8 @@ public AgeFileFilter(final long cutoffMillis, final boolean acceptOlder) {
/**
* Checks to see if the last modification of the file matches cutoff favorably.
* <p>
* If last modification time equals cutoff and newer files are required, file <b>IS NOT</b> selected. If last
* modification time equals cutoff and older files are required, file <b>IS</b> selected.
* If last modification time equals cutoff and newer files are required, file <strong>IS NOT</strong> selected. If last
* modification time equals cutoff and older files are required, file <strong>IS</strong> selected.
* </p>
*
* @param file the File to check
Expand All @@ -190,8 +190,8 @@ public boolean accept(final File file) {
/**
* Checks to see if the last modification of the file matches cutoff favorably.
* <p>
* If last modification time equals cutoff and newer files are required, file <b>IS NOT</b> selected. If last
* modification time equals cutoff and older files are required, file <b>IS</b> selected.
* If last modification time equals cutoff and newer files are required, file <strong>IS NOT</strong> selected. If last
* modification time equals cutoff and older files are required, file <strong>IS</strong> selected.
* </p>
*
* @param file the File to check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* }
* </pre>
* <p>
* <b>N.B.</b> For read-only files, use {@code CanReadFileFilter.READ_ONLY}.
* <strong>N.B.</strong> For read-only files, use {@code CanReadFileFilter.READ_ONLY}.
* </p>
* <h2>Deprecating Serialization</h2>
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(DirectoryFileFilter.INSTANCE);
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(EmptyFileFilter.EMPTY);
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(FileFileFilter.INSTANCE);
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(HiddenFileFilter.HIDDEN);
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(MagicNumberFileFilter("ustar", 257));
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new NameFileFilter("Test"));
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new PrefixFileFilter("Test"));
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
* final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$"));
* //
* // Walk one directory
* Files.<b>walkFileTree</b>(dir, Collections.emptySet(), 1, visitor);
* Files.<strong>walkFileTree</strong>(dir, Collections.emptySet(), 1, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getFileList());
* //
* visitor.getPathCounters().reset();
* //
* // Walk directory tree
* Files.<b>walkFileTree</b>(dir, visitor);
* Files.<strong>walkFileTree</strong>(dir, visitor);
* System.out.println(visitor.getPathCounters());
* System.out.println(visitor.getDirList());
* System.out.println(visitor.getFileList());
Expand Down
Loading

0 comments on commit 23b4ec6

Please sign in to comment.