FromMatchesFilter has NullPointerException and VCard has ClassCastException

hi,

I found two exceptions when using smack, the attach is my patch file to fix them. Hope it is useful.
0001-fromMatchesFilter-NullPointerException-and-VCard-Cla.patch.zip (1116 Bytes)

Thanks for reporting. The NPE in FromMatchesFilter is in fact a bug.

However I am not sure about the CCE in VCard.java:561: The collector will either return the result IQ which must be of type VCard or receiv an error IQ which will be thrown as XMPPErrorException. There should be no cases where anything else then a VCard instance is returned.

** About CCE in VCard.java:561, **if user who hasn’t vcard in server want to get vcard info from server(my test server is ejabbered) , server will return the following result. In this condition, the result has not VCard instance.

D/SMACK (32242): SENT (4):

D/SMACK (32242):

D/SMACK (32242): RCV (4):

This is a bug in ejabbered then. XEP-0054 3.1 clearly states that

If no vCard exists, the server MUST return a stanza error (which SHOULD be ) or an IQ-result containing an empty element.

ok,I see. Thanks.

Oh and I suggest that you report it to the ejabbered developers so they can fix it

Yes, I have reported it to ejabbered bug tracking system.