修正编译错误,优化部分逻辑
This commit is contained in:
@@ -50,7 +50,7 @@ abstract public class AdminAction extends Action {
|
||||
Long ts;
|
||||
try {
|
||||
ts = Long.parseLong(timestamp);
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ErrorCode.INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ abstract public class ChannelAction extends Action {
|
||||
Long ts;
|
||||
try {
|
||||
ts = Long.parseLong(timestamp);
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ErrorCode.INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ abstract public class RobotAction extends Action {
|
||||
Long ts;
|
||||
try {
|
||||
ts = Long.parseLong(timestamp);
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ErrorCode.INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user