This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-net.git
commit e70b73117ddec1c78ca9641e0396002b17900031 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue May 28 08:06:38 2024 -0400 Deprecate org.apache.commons.net.util.TrustManagerUtils.TrustManagerUtils() for removal --- src/changes/changes.xml | 1 + .../org/apache/commons/net/util/TrustManagerUtils.java | 10 ++++++++++ .../apache/commons/net/util/TrustManagerUtilsTest.java | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 07cc58fe..01793784 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -73,6 +73,7 @@ The <action> type attribute can be add,update,fix,remove. <action type="fix" issue="NET-730" dev="ggregory" due-to="Johannes Thalmair, Gary Gregory">Cannot connect to FTP server with HTTP proxy.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Base 64 Encoding with URL and Filename Safe Alphabet should not chunk per RFC 4648.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate org.apache.commons.net.util.Charsets.Charsets() for removal.</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate org.apache.commons.net.util.TrustManagerUtils.TrustManagerUtils() for removal.</action> <!-- ADD --> <action type="add" issue="NET-726" dev="ggregory" due-to="PJ Fanning, Gary Gregory">Add protected getters to FTPSClient #204.</action> <action type="add" dev="ggregory" due-to="Gary Gregory">Add SubnetUtils.toString().</action> diff --git a/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java b/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java index 5ef5a827..f755d973 100644 --- a/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java +++ b/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java @@ -106,4 +106,14 @@ public final class TrustManagerUtils { return CHECK_SERVER_VALIDITY; } + /** + * Depreacted. + * + * @deprecated Will be removed in 2.0. + */ + @Deprecated + public TrustManagerUtils() { + // empty + } + } diff --git a/src/test/java/org/apache/commons/net/util/TrustManagerUtilsTest.java b/src/test/java/org/apache/commons/net/util/TrustManagerUtilsTest.java new file mode 100644 index 00000000..c0a85663 --- /dev/null +++ b/src/test/java/org/apache/commons/net/util/TrustManagerUtilsTest.java @@ -0,0 +1,18 @@ +package org.apache.commons.net.util; + +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; + +import org.junit.jupiter.api.Test; + +/** + * Tests {@link TrustManagerUtils}. + */ +public class TrustManagerUtilsTest { + + @SuppressWarnings("deprecation") + @Test + public void testToConstructor() { + assertDoesNotThrow(TrustManagerUtils::new); + } + +}