From 0d67701735381ec1b49ab1cf6d5ed68189a9bdd1 Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Mon, 12 Dec 2016 07:59:38 +0100 Subject: [PATCH] Changed default CustomCommandHandler While throwing an IllegalStateException is great to signal developers they need to register a default handler, it's a dangerous default for all those who don't need one. A log entry on 'debug' level should suffice. --- .../src/main/java/ch/dissem/bitmessage/BitmessageContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/ch/dissem/bitmessage/BitmessageContext.java b/core/src/main/java/ch/dissem/bitmessage/BitmessageContext.java index 9e155ad..78bfa73 100644 --- a/core/src/main/java/ch/dissem/bitmessage/BitmessageContext.java +++ b/core/src/main/java/ch/dissem/bitmessage/BitmessageContext.java @@ -435,8 +435,8 @@ public class BitmessageContext { customCommandHandler = new CustomCommandHandler() { @Override public MessagePayload handle(CustomMessage request) { - throw new IllegalStateException( - "Received custom request, but no custom command handler configured."); + LOG.debug("Received custom request, but no custom command handler configured."); + return null; } }; }