From 5b2bd7f928bbf9d3233ff029ed5c09ac46daf0de Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 28 Nov 2016 14:37:02 +0300 Subject: all components using jackson now, org.json serializer moved to compatibility tests package --- juick-xmpp-bot/src/main/java/com/juick/components/XMPPBot.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'juick-xmpp-bot/src/main/java/com/juick/components') diff --git a/juick-xmpp-bot/src/main/java/com/juick/components/XMPPBot.java b/juick-xmpp-bot/src/main/java/com/juick/components/XMPPBot.java index 43ed3dde..15ba073e 100644 --- a/juick-xmpp-bot/src/main/java/com/juick/components/XMPPBot.java +++ b/juick-xmpp-bot/src/main/java/com/juick/components/XMPPBot.java @@ -1,5 +1,6 @@ package com.juick.components; +import com.fasterxml.jackson.core.JsonProcessingException; import com.juick.User; import com.juick.server.UserQueries; import com.juick.server.helpers.UserInfo; @@ -78,16 +79,14 @@ public class XMPPBot implements AutoCloseable { replyMessage.setBody(reply.getDescription()); replyMessage.setFrom(juickJid); component.send(replyMessage); - } catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException ex) { + } catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException | JsonProcessingException ex) { logger.warn("unhandled error", ex); } } }); component.connect(); - } catch (XmppException e) { + } catch (XmppException | IOException e) { logger.error("bot connection error", e); - } catch (IOException e) { - logger.error("bot initialization error", e); } } -- cgit v1.2.3