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 5f17d6dc92278626ac92360b431678d2b9e462d3 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Jun 16 07:55:22 2024 -0400 Remove InvalidKeySpecException from org.apache.commons.net.smtp.AuthenticatingSMTPClient.auth(AUTH_METHOD, String, String) never throws, it's not thrown Note this change is binary compatible --- src/changes/changes.xml | 2 +- .../java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 9d7338ea..2ff2a224 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -68,7 +68,7 @@ The <action> type attribute can be add,update,fix,remove. <!-- FIX --> <action type="fix" dev="ggregory" due-to="Gary Gregory">Remove InvalidKeySpecException from AuthenticatingIMAPClient.auth(AUTH_METHOD, String, String) never throws, it's not thrown.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Remove InvalidKeySpecException from ExtendedPOP3Client.auth(AUTH_METHOD, String, String) never throws, it's not thrown.</action> - + <action type="fix" dev="ggregory" due-to="Gary Gregory">Remove InvalidKeySpecException from org.apache.commons.net.smtp.AuthenticatingSMTPClient.auth(AUTH_METHOD, String, String) never throws, it's not thrown.</action> <!-- ADD --> <!-- UPDATE --> <action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 70 to 71 #261.</action> diff --git a/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java b/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java index d7141651..dbd7efad 100644 --- a/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java +++ b/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.net.InetAddress; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; -import java.security.spec.InvalidKeySpecException; import java.util.Arrays; import java.util.Base64; @@ -161,10 +160,9 @@ public class AuthenticatingSMTPClient extends SMTPSClient { * @throws IOException If an I/O error occurs while either sending a command to the server or receiving a reply from the server. * @throws NoSuchAlgorithmException If the CRAM hash algorithm cannot be instantiated by the Java runtime system. * @throws InvalidKeyException If the CRAM hash algorithm failed to use the given password. - * @throws InvalidKeySpecException If the CRAM hash algorithm failed to use the given password. */ public boolean auth(final AuthenticatingSMTPClient.AUTH_METHOD method, final String user, final String password) - throws IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException { + throws IOException, NoSuchAlgorithmException, InvalidKeyException { if (!SMTPReply.isPositiveIntermediate(sendCommand(SMTPCommand.AUTH, AUTH_METHOD.getAuthName(method)))) { return false; }