修正编译错误,优化部分逻辑

This commit is contained in:
imhao183
2019-12-30 08:54:46 +08:00
parent 190da8934f
commit 9baa1f9b23
7 changed files with 13 additions and 9 deletions
@@ -119,7 +119,7 @@ public final class BrokerConstants {
public static final String MESSAGE_Disable_Stranger_Chat = "message.disable_stranger_chat";
public static final String MESSAGE_Blacklist_Strategy = "blacklist.strategy";
public static final String MESSAGE_Blacklist_Strategy = "message.blacklist.strategy";
public static final String FRIEND_Repeat_Request_Duration = "friend.repeat_request_duration";
public static final String FRIEND_Reject_Request_Duration = "friend.reject_request_duration";
@@ -42,8 +42,8 @@ public class SendMessageHandler extends IMHandler<WFCMessage.Message> {
}
try {
mBlacklistStrategy = Integer.parseInt(Server.getConfig().getProperty(BrokerConstants.MESSAGE_Blacklist_Strategy));
} catch (NumberFormatException e) {
mBlacklistStrategy = Integer.parseInt(mServer.getConfig().getProperty(BrokerConstants.MESSAGE_Blacklist_Strategy));
} catch (Exception e) {
e.printStackTrace();
}
}
@@ -137,13 +137,13 @@ public class MemoryMessagesStore implements IMessagesStore {
}
try {
mFriendRequestDuration = Long.parseLong(Server.getConfig().getProperty(FRIEND_Repeat_Request_Duration));
mFriendRequestDuration = Long.parseLong(m_Server.getConfig().getProperty(FRIEND_Repeat_Request_Duration));
} catch (Exception e) {
e.printStackTrace();
}
try {
mFriendRejectDuration = Long.parseLong(Server.getConfig().getProperty(FRIEND_Reject_Request_Duration));
mFriendRejectDuration = Long.parseLong(m_Server.getConfig().getProperty(FRIEND_Reject_Request_Duration));
} catch (Exception e) {
e.printStackTrace();
}
@@ -2432,7 +2432,7 @@ public class MemoryMessagesStore implements IMessagesStore {
else if(modifyType == Modify_Channel_OnlyCallback) {
try {
newInfoBuilder.setAutomatic(Integer.parseInt(value));
} catch (NumberFormatException e) {
} catch (Exception e) {
e.printStackTrace();
}
}