You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/06/16 13:02:54 UTC

(commons-net) 02/26: Remove InvalidKeySpecException from ExtendedPOP3Client.auth(AUTH_METHOD, String, String) never throws, it's not thrown

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 2eb9f5357eb45f2b5cc8e2ef423b17e59197f103
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jun 16 07:54:25 2024 -0400

    Remove InvalidKeySpecException from ExtendedPOP3Client.auth(AUTH_METHOD,
    String, String) never throws, it's not thrown
    
    Note this change is binary compatible
---
 src/changes/changes.xml                                           | 2 ++
 src/main/java/org/apache/commons/net/pop3/ExtendedPOP3Client.java | 4 +---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 166008a0..9d7338ea 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -67,6 +67,8 @@ The <action> type attribute can be add,update,fix,remove.
     <release version="3.11.2" date="YYYY-MM-DD" description="This is a feature and maintenance release. Java 8 or later is required.">
       <!-- 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>
+
       <!-- 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/pop3/ExtendedPOP3Client.java b/src/main/java/org/apache/commons/net/pop3/ExtendedPOP3Client.java
index ce7d4db3..88c91318 100644
--- a/src/main/java/org/apache/commons/net/pop3/ExtendedPOP3Client.java
+++ b/src/main/java/org/apache/commons/net/pop3/ExtendedPOP3Client.java
@@ -20,7 +20,6 @@ package org.apache.commons.net.pop3;
 import java.io.IOException;
 import java.security.InvalidKeyException;
 import java.security.NoSuchAlgorithmException;
-import java.security.spec.InvalidKeySpecException;
 import java.util.Base64;
 
 import javax.crypto.Mac;
@@ -82,10 +81,9 @@ public class ExtendedPOP3Client extends POP3SClient {
      * @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 AUTH_METHOD method, final String user, final String password)
-            throws IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException {
+            throws IOException, NoSuchAlgorithmException, InvalidKeyException {
         if (sendCommand(POP3Command.AUTH, method.getAuthName()) != POP3Reply.OK_INT) {
             return false;
         }