Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARK-2090 replaced some deprecated Smack apis #457

Merged
merged 1 commit into from
Feb 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public Object construct() {
catch (XMPPException | SmackException | InterruptedException | XmppStringprepException e) {

if ( e instanceof XMPPException.XMPPErrorException ) {
condition = ( (XMPPException.XMPPErrorException) e ).getXMPPError().getCondition();
condition = ( (XMPPException.XMPPErrorException) e ).getStanzaError().getCondition();
}

if ( condition == null ) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jivesoftware/LoginDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ private boolean login()
SmackConfiguration.DEBUG = true;
}

SmackConfiguration.setDefaultPacketReplyTimeout( localPref.getTimeOut() * 1000 );
SmackConfiguration.setDefaultReplyTimeout( localPref.getTimeOut() * 1000 );

try
{
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jivesoftware/spark/ChatManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public String getDefaultConferenceService() {
if (conferenceService == null) {
try {
final MultiUserChatManager multiUserChatManager = MultiUserChatManager.getInstanceFor( SparkManager.getConnection() );
List<DomainBareJid> col = multiUserChatManager.getXMPPServiceDomains();
List<DomainBareJid> col = multiUserChatManager.getMucServiceDomains();
if (col.size() > 0) {
conferenceService = col.iterator().next().toString();
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/jivesoftware/spark/ui/ContactList.java
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,7 @@ public void initialize() {
try {
sharedGroups = SharedGroupManager.getSharedGroups(SparkManager.getConnection());
} catch (XMPPErrorException e) {
StanzaError stanzaError = e.getXMPPError();
StanzaError stanzaError = e.getStanzaError();
if (stanzaError.getCondition() == Condition.service_unavailable) {
// Server does not support shared groups.
return;
Expand Down Expand Up @@ -2619,4 +2619,4 @@ public void showAddContact(String contact)
public ContactItem getActiveItem() {
return activeItem;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ private void addRegisteredServices() {
public Object construct() {
try {
if (SparkManager.getConnection().isConnected()) {
mucServices = MultiUserChatManager.getInstanceFor( SparkManager.getConnection() ).getXMPPServiceDomains();
mucServices = MultiUserChatManager.getInstanceFor( SparkManager.getConnection() ).getMucServiceDomains();
}
}
catch (XMPPException | SmackException | InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public Object construct()
StanzaError error = null;
if ( ex instanceof XMPPException.XMPPErrorException )
{
error = ( (XMPPException.XMPPErrorException) ex ).getXMPPError();
error = ( (XMPPException.XMPPErrorException) ex ).getStanzaError();

if ( StanzaError.Condition.conflict.equals( error.getCondition() ) )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ else if ( stanza instanceof Message )
if ( carbon != null )
{
// Is the a carbon copy?
final Message forwardedStanza = (Message) carbon.getForwarded().getForwardedPacket();
final Message forwardedStanza = (Message) carbon.getForwarded().getForwardedStanza();
if ( forwardedStanza.getBody() != null )
{
if ( carbon.getDirection() == CarbonExtension.Direction.received )
Expand Down