Avoid throws Exception where possible - Phase III
This commit is contained in:
committed by
Artem Bilan
parent
b138ab80f8
commit
78199dca9b
@@ -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 =
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user