1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-01 16:32:08 +01:00
Smack/smack-im/src/main
Florian Schmaus e141de9aa4 Fix possible NPE in roster push listener
Daniele Ricci reporting the following NPE using Smack 4.1.9

java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.indexOf(int)' on a null object reference
       at org.jxmpp.util.XmppStringUtils.parseBareJid(XmppStringUtils.java:124)
       at org.jivesoftware.smack.roster.Roster$RosterPushListener.handleIQRequest(Roster.java:1416)
       at org.jivesoftware.smack.AbstractXMPPConnection$2.run(AbstractXMPPConnection.java:1061)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
       at java.lang.Thread.run(Thread.java:818)

This is possibly caused by a service sending roster pushes for unbound
connections, i.e. where getUsers() returns 'null'. We now log such
situations instead throwing an NPE.
2017-03-10 17:47:13 +01:00
..
java/org/jivesoftware/smack Fix possible NPE in roster push listener 2017-03-10 17:47:13 +01:00
resources/org.jivesoftware.smack.im Added support for pre-approved subscription requests (RFC 6121 § 3.4) 2015-03-19 11:31:05 +01:00