Avoid throws Exception where possible - Phase III

This commit is contained in:
Gary Russell
2019-03-07 16:53:48 -05:00
committed by Artem Bilan
parent b138ab80f8
commit 78199dca9b
42 changed files with 297 additions and 219 deletions

View File

@@ -21,6 +21,7 @@ import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.roster.Roster;
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
import org.jxmpp.stringprep.XmppStringprepException;
import org.jxmpp.util.XmppStringUtils;
import org.springframework.beans.factory.BeanInitializationException;
@@ -134,7 +135,7 @@ public class XmppConnectionFactoryBean extends AbstractFactoryBean<XMPPConnectio
}
@Override
protected XMPPConnection createInstance() throws Exception {
protected XMPPConnection createInstance() throws XmppStringprepException {
XMPPTCPConnectionConfiguration connectionConfig = this.connectionConfiguration;
if (connectionConfig == null) {
XMPPTCPConnectionConfiguration.Builder builder =

View File

@@ -58,7 +58,7 @@ public class XmppConnectionFactoryBeanTests {
new XmppConnectionFactoryBean() {
@Override
protected XMPPConnection createInstance() throws Exception {
protected XMPPConnection createInstance() {
return mock(XMPPTCPConnection.class);
}
@@ -78,7 +78,7 @@ public class XmppConnectionFactoryBeanTests {
new XmppConnectionFactoryBean() {
@Override
protected XMPPConnection createInstance() throws Exception {
protected XMPPConnection createInstance() {
return mock(XMPPTCPConnection.class);
}