From a0ad92ad35d5adafcf56df3f96051d8e65c23a3c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 25 Sep 2020 09:30:37 -0400 Subject: [PATCH] fix a few JavaDoc errors --- .../maven/shared/utils/io/FileUtils.java | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java b/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java index a3be324c..f1947827 100644 --- a/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java +++ b/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java @@ -69,8 +69,8 @@ *

*

File-related methods

*

- * There are methods to create a {@link #toFile File from a URL}, copy a - * copy a {@link #copyFile File to another File}, + * There are methods to create a {@link #toFile File from a URL}, copy a + * {@link #copyFile File to another File}, * copy a {@link #copyURLToFile URL's contents to a File}, * as well as methods to {@link #deleteDirectory(File) delete} and {@link #cleanDirectory(File) * clean} a directory. @@ -741,7 +741,7 @@ public static boolean contentEquals( @Nonnull final File file1, @Nonnull final F * @throws IllegalArgumentException if destinationDirectory isn't a directory * @throws IOException if source does not exist, the file in * destinationDirectory cannot be written to, or an IO error - * occurs during copying. + * occurs during copying * @deprecated use {@code org.apache.commons.io.FileUtils.copyFileToDirectory()} */ @Deprecated @@ -791,11 +791,11 @@ private static void copyFileToDirectoryIfModified( @Nonnull final File source, * @param source an existing non-directory File to copy bytes from * @param destination a non-directory File to write bytes to (possibly * overwriting) - * @throws IOException if source does not exist, destination cannot be - * written to, or an IO error occurs during copying + * @throws IOException if source does not exist, destination cannot be + * written to, or an IO error occurs during copying * @throws java.io.FileNotFoundException if destination is a directory - * @deprecated use {@code java.nio.Files.copy(source.toPath(), destination.toPath(), CopyOptions.NOFOLLOW_LINKS, - * CopyOptions.REPLACE_EXISTING)} + * @deprecated use {@code java.nio.Files.copy(source.toPath(), destination.toPath(), LinkOption.NOFOLLOW_LINKS, + * StandardCopyOption.REPLACE_EXISTING)} */ @Deprecated public static void copyFile( @Nonnull final File source, @Nonnull final File destination ) @@ -873,7 +873,7 @@ private static void doCopyFile( @Nonnull File source, @Nonnull File destination * @param source An existing non-directory File to copy bytes from. * @param destination A non-directory File to write bytes to (possibly * overwriting). - * @return true if no problem occured + * @return true if no problem occurred * @throws IOException if source does not exist, destination cannot be * written to, or an IO error occurs during copying. */ @@ -895,9 +895,9 @@ private static boolean copyFileIfModified( @Nonnull final File source, @Nonnull * The directories up to destination will be created if they don't already exist. * destination will be overwritten if it already exists. * - * @param source A URL to copy bytes from. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). + * @param source a URL to copy bytes from + * @param destination a non-directory File to write bytes to (possibly + * overwriting) * @throws IOException if *

* @deprecated use {@code java.nio.Files.copy(source.openStream(), destination.toPath(), - * CopyOptions.REPLACE_EXISTING)} + * StandardCopyOption.REPLACE_EXISTING)} */ public static void copyURLToFile( @Nonnull final URL source, @Nonnull final File destination ) throws IOException @@ -918,10 +918,10 @@ public static void copyURLToFile( @Nonnull final URL source, @Nonnull final File * The directories up to destination will be created if they don't already exist. * destination will be overwritten if it already exists. * - * @param source An {@link InputStream} to copy bytes from. This stream is + * @param source an {@link InputStream} to copy bytes from. This stream is * guaranteed to be closed. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). + * @param destination a non-directory File to write bytes to (possibly + * overwriting) * @throws IOException if * * @deprecated use {@code java.nio.Files.copy(source, destination.toPath(), - * CopyOptions.REPLACE_EXISTING)} + * StandardCopyOption.REPLACE_EXISTING)} */ @Deprecated private static void copyStreamToFile( @Nonnull @WillClose final InputStream source, @@ -972,7 +972,7 @@ private static void copyStreamToFile( @Nonnull @WillClose final InputStream sour * * * @param path the path to normalize - * @return the normalized String, or null if too many ..'s. + * @return the normalized String, or null if too many ..'s * @deprecated use {@code org.apache.commons.io.FileNameUtils.normalize()} */ @Deprecated @@ -1026,8 +1026,7 @@ private static void copyStreamToFile( @Nonnull @WillClose final InputStream sour * relative (doesn't start with /), it will be resolved relative to * baseFile, otherwise it is treated as a normal root-relative path. * - * @param baseFile Where to resolve filename from, if filename is - * relative. + * @param baseFile where to resolve filename from, if filename is relative * @param filename absolute or relative file path to resolve * @return the canonical File of filename */