This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 905d8b593f479aa90cd8218d2a33052927bd4f03 Author: Benoit Tellier <[email protected]> AuthorDate: Thu Sep 26 10:58:03 2019 +0700 JAMES-2902 PotocolHandler can provide defaults for init and destroy This enables: - Writing hooks as lambda in tests - Massive line count reduction for SMTP, POP3 & LMTP implementation --- .../org/apache/james/protocols/api/handler/ProtocolHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java b/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java index 29c4adf..02e85cd 100644 --- a/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java +++ b/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java @@ -36,11 +36,15 @@ public interface ProtocolHandler { * @param config * @throws ConfigurationException */ - void init(Configuration config) throws ConfigurationException; + default void init(Configuration config) throws ConfigurationException { + + } /** * Destroy object */ - void destroy(); + default void destroy() { + + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
