Assume the element
<foo:bar xmlns='namespace' xmlns:foo='foo-namespace'/>
then the <bar/> element's namespace is 'foo-namespace', but the
default namespace is 'namespace'. And this is the namespace that
scopes into inner elements.
aTalk shows the following exception:
2020-12-14 12:11:13.704 7370-30976/org.atalk.android E/AndroidRuntime: FATAL EXCEPTION: AccountManager.loadStoredAccounts
Process: org.atalk.android, PID: 7370
java.lang.AssertionError: Element type 'EE' is neither of type Class or ParameterizedType
at org.jivesoftware.smack.provider.AbstractProvider.<init>(AbstractProvider.java:46)
at org.jivesoftware.smack.provider.Provider.<init>(Provider.java:40)
at org.jivesoftware.smack.provider.ExtensionElementProvider.<init>(ExtensionElementProvider.java:29)
at org.xmpp.extensions.DefaultExtensionElementProvider.<init>(DefaultExtensionElementProvider.java:43)
at org.xmpp.extensions.coin.CoinIQProvider.<init>(CoinIQProvider.java:46)
at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.initialize(ProtocolProviderServiceJabberImpl.java:2091)
at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderFactoryJabberImpl.createService(ProtocolProviderFactoryJabberImpl.java:121)
at net.java.sip.communicator.service.protocol.ProtocolProviderFactory.loadAccount(ProtocolProviderFactory.java:934)
at net.java.sip.communicator.service.protocol.AccountManager.doLoadStoredAccounts(AccountManager.java:139)
at net.java.sip.communicator.service.protocol.AccountManager.loadStoredAccounts(AccountManager.java:294)
at net.java.sip.communicator.service.protocol.AccountManager.runInLoadStoredAccountsThread(AccountManager.java:394)
at net.java.sip.communicator.service.protocol.AccountManager.access$000(AccountManager.java:36)
at
net.java.sip.communicator.service.protocol.AccountManager$1.run(AccountManager.java:329)
where CoinIQProvider line 46-47 [1] reads
private final DefaultExtensionElementProvider<URIsExtension> urisProvider
= new
DefaultExtensionElementProvider<>(URIsExtension.class);
This fixes SMACK-898.
1: f61f264312/aTalk/src/main/java/org/xmpp/extensions/coin/CoinIQProvider.java (L47)
The method lookupHostAddress() returns null in case of an error, hence
we need to test if the returned value is null prior adding the endpoint.
Should fix the following NPE:
java.lang.NullPointerException:
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration (XMPPTCPConnection.java:606)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal (XMPPTCPConnection.java:846)
at org.jivesoftware.smack.AbstractXMPPConnection.connect (AbstractXMPPConnection.java:530)
at org.jivesoftware.smack.ReconnectionManager$2.run (ReconnectionManager.java:282)
at java.lang.Thread.run (Thread.java:784)
Reported-by: Eng ChongMeng <cmeng.gm@gmail.com>
This fixes an inconsistent representation of a 'no error' representation, that
causes a file transfer in which not enough bytes were transferred to _not_ be
marked as having a problem.
This prevents a race condition of enter() with the presence listern by
waiting until all presences have been processed.
Reported-by: Guus der Kinderen <guus@goodbytes.nl>
To increase readability, and with that maintainability, we rename
'presence' to 'reflectedSelfPresence' in MultiUserChat.enter(), to
make it clear what kind of presence this variable holds.
Also mark the variable as final.