mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
代码优化,由IDEA自动进行的Code Cleanup
This commit is contained in:
@@ -7,6 +7,6 @@ import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
*/
|
||||
public interface WxErrorExceptionHandler {
|
||||
|
||||
public void handle(WxErrorException e);
|
||||
void handle(WxErrorException e);
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@ public interface WxMessageDuplicateChecker {
|
||||
* @param messageId messageId需要根据上面讲的方式构造
|
||||
* @return 如果是重复消息,返回true,否则返回false
|
||||
*/
|
||||
public boolean isDuplicate(String messageId);
|
||||
boolean isDuplicate(String messageId);
|
||||
|
||||
}
|
||||
|
||||
@@ -87,11 +87,7 @@ public class WxMessageInMemoryDuplicateChecker implements WxMessageDuplicateChec
|
||||
}
|
||||
checkBackgroundProcessStarted();
|
||||
Long timestamp = msgId2Timestamp.putIfAbsent(messageId, System.currentTimeMillis());
|
||||
if (timestamp == null) {
|
||||
// 第一次接收到这个消息
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return timestamp != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user