代码优化,由IDEA自动进行的Code Cleanup

This commit is contained in:
BinaryWang
2016-07-27 17:57:13 +08:00
parent 38ab7759cb
commit b1f0b0787a
44 changed files with 140 additions and 156 deletions

View File

@@ -7,6 +7,6 @@ import me.chanjar.weixin.common.exception.WxErrorException;
*/
public interface WxErrorExceptionHandler {
public void handle(WxErrorException e);
void handle(WxErrorException e);
}

View File

@@ -22,6 +22,6 @@ public interface WxMessageDuplicateChecker {
* @param messageId messageId需要根据上面讲的方式构造
* @return 如果是重复消息返回true否则返回false
*/
public boolean isDuplicate(String messageId);
boolean isDuplicate(String messageId);
}

View File

@@ -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;
}