Retrieve a list of archived message with "after" set to incorrect value

Łukasz Soszyński
Added almost 5 years ago

I observed very minor issue. When I retrieve a list of archived messages with "after" set to incorrect value then server doesn't return response.

Example request (incorrect string: 2014-04-02T15:58:36+0000):

<iq from="000000000101@localhost/localhost" xmlns="jabber:client" id="cccc" type="get">
                <list xmlns="urn:xmpp:archive" start="1990-01-01T00:00:00.001+0000">
                                <set xmlns="">




In Tigase log I can see stacktrace:

java.lang.NumberFormatException: For input string: "2014-04-02T15:58:36+0000"
        at java.lang.NumberFormatException.forInputString(
        at java.lang.Integer.parseInt(
        at java.lang.Integer.parseInt(
        at tigase.archive.MessageArchiveDB.getCollections(
        at tigase.archive.MessageArchiveComponent.listCollections(
        at tigase.archive.MessageArchiveComponent.processActionPacket(
        at tigase.archive.MessageArchiveComponent.processPacket(
        at tigase.server.AbstractMessageReceiver$

I want server to always return an XMPP “item-not-found” error to the caller (or an application-specific XMPP error ) if a selector value does not have the expected format