From ed8f3dbf5b6c62d26269b4dd3ced286b97eef5fc Mon Sep 17 00:00:00 2001 From: jmehrens Date: Mon, 29 Jan 2024 23:43:14 -0600 Subject: [PATCH] MailHander should catch ServiceConfigurationError #123 Signed-off-by: jmehrens --- .../angus/mail/util/logging/MailHandler.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/MailHandler.java b/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/MailHandler.java index c1ab997..95fe9a3 100644 --- a/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/MailHandler.java +++ b/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/MailHandler.java @@ -2146,6 +2146,13 @@ private void reportError(Message msg, Exception ex, int code) { } } + /** + * Report a ServiceConfigurationError to the error manager. + * + * @param t the service configuration error. + * @param code the error manager reason code. + * @since Angus Mail 2.0.3 + */ private void reportConfigurationError(Throwable t, int code) { final Integer idx = MUTEX.get(); if (idx == null || idx > MUTEX_SERVICE) { @@ -2288,9 +2295,8 @@ private String contentWithEncoding(String type, String encoding) { /** * Sets the capacity for this handler. * - * @param newCapacity the max number of records. - * @throws SecurityException if a security manager exists and the - * caller does not have LoggingPermission("control"). + * @param newCapacity the max number of records. Default capacity is used if + * the value is negative. * @throws IllegalStateException if called from inside a push. */ private synchronized void setCapacity0(int newCapacity) { @@ -4209,7 +4215,7 @@ private String descriptionFrom(Formatter f, Filter filter, Formatter name) { * Gets a class name represents the behavior of the formatter. * The class name may not be assignable to a Formatter. * - * @param f the formatter. + * @param f the formatter or null. * @return a class name that represents the given formatter. * @since JavaMail 1.4.5 */