zk / xmpp-clj

A lightweight clojure wrapper around the smack jabber/XMPP library
41 stars 21 forks source link

Better 'connect-info' validation? #3

Closed jasperla closed 11 years ago

jasperla commented 12 years ago

Currently when 'connect-info' lacks a field, or contains ':user' instead of ':username' you're left with:

Exception in thread "main" java.lang.NullPointerException at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:388) at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:349) [...]

Wouldn't it be better to do very basic validation before going to use 'connect-info' in start-bot?

zk commented 11 years ago

Fixed by https://github.com/zkim/xmpp-clj/commit/e1a6a288e77748cc865014ea69dbcf79bcc73030#L1R104