powered by Jive Software

AbstractXMPPConnection tests using Groovy

Hi All,

I thought I’d post this, as it might indicate a bug at a lower level than I understand. We use Groovy for a lot of our testing, mainly for it’s extra XML help. If you set an AbstractXMPPConnection to null at construction time, it throws a weird error. Test code and stack trace is below.

Create a file called TestAbstractXMPPFail.groovy and paste this code.

import org.jivesoftware.smack.AbstractXMPPConnection class TestAbstractXMPPFail extends GroovyTestCase{
    private AbstractXMPPConnection connection = null;
    public void test() {
        System.out.println("Hello abstract XMPP world.");

And you’ll get a massive stack trace (attached).

If you now remove the null, ie. leave it blank, it works fine.

stackTrace.rtf (7909 Bytes)