You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2023/05/29 11:28:56 UTC
[maven-shared-utils] branch MSHARED-1260 created (now c0a73a7)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch MSHARED-1260
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
at c0a73a7 [MSHARED-1260] Deprecate FileUtils.copyFile and FilterWrapper in favor of org.apache.maven.shared.filtering
This branch includes the following new commits:
new c0a73a7 [MSHARED-1260] Deprecate FileUtils.copyFile and FilterWrapper in favor of org.apache.maven.shared.filtering
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-shared-utils] 01/01: [MSHARED-1260] Deprecate FileUtils.copyFile and FilterWrapper in favor of org.apache.maven.shared.filtering
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch MSHARED-1260
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
commit c0a73a7e66a761af08bbabca4d4861fa58500b96
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Mon May 29 07:28:47 2023 -0400
[MSHARED-1260] Deprecate FileUtils.copyFile and FilterWrapper in favor of org.apache.maven.shared.filtering
---
.../java/org/apache/maven/shared/utils/io/FileUtils.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 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 1ce26eb..1417878 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
@@ -1662,8 +1662,12 @@ public class FileUtils {
* @param to the destination file
* @param encoding the file output encoding (only if wrappers is not empty)
* @param wrappers array of {@link FilterWrapper}
+ * @throws UnsupportedEncodingException if the JDK in use does not recognize or support the
+ * named encoding
* @throws IOException if an IO error occurs during copying or filtering
+ * @deprecated use {@code org.apache.maven.shared.filtering.FilteringUtils.copyFile()} instead
*/
+ @Deprecated
public static void copyFile(
@Nonnull File from, @Nonnull File to, @Nullable String encoding, @Nullable FilterWrapper... wrappers)
throws IOException {
@@ -1673,6 +1677,7 @@ public class FileUtils {
/**
* Wrapper class for Filter.
*/
+ @Deprecated
public abstract static class FilterWrapper {
/**
* @param fileReader {@link Reader}
@@ -1682,7 +1687,7 @@ public class FileUtils {
}
/**
- * <b>If wrappers is null or empty, the file will be copy only if to.lastModified() < from.lastModified() or if
+ * <b>If wrappers is null or empty, the file will be copied only if to.lastModified() < from.lastModified() or if
* overwrite is true</b>
*
* @param from the file to copy
@@ -1691,8 +1696,12 @@ public class FileUtils {
* @param wrappers array of {@link FilterWrapper}
* @param overwrite if true and wrappers is null or empty, the file will be copied even if
* to.lastModified() < from.lastModified()
+ * @throws UnsupportedEncodingException if the JDK in use does not recognize or support the
+ * named encoding
* @throws IOException if an IO error occurs during copying or filtering
+ * @deprecated use {@code org.apache.maven.shared.filtering.FilteringUtils.copyFile()} instead
*/
+ @Deprecated
public static void copyFile(
@Nonnull File from,
@Nonnull File to,
@@ -1807,7 +1816,7 @@ public class FileUtils {
* @param file the file
* @return a List containing every every line not starting with # and not empty
* @throws IOException if any
- * @deprecated assumes the platform default character set
+ * @deprecated assumes the platform default character set.
*/
@Deprecated
@Nonnull