소스 검색

修复BoundedPriorityBlockingQueue#offer方法一处细节问题

everywhere.z 8 달 전
부모
커밋
e944aa7f4d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      liteflow-core/src/main/java/com/yomahub/liteflow/util/BoundedPriorityBlockingQueue.java

+ 1 - 1
liteflow-core/src/main/java/com/yomahub/liteflow/util/BoundedPriorityBlockingQueue.java

@@ -49,7 +49,7 @@ public class BoundedPriorityBlockingQueue<E> extends PriorityBlockingQueue<E> {
 		if (size() >= capacity) {
 			E head = peek();
 			if (this.comparator().compare(e, head) <= 0) {
-				return true;
+				return false;
 			}
 			// 当队列满时,就要淘汰顶端队列
 			poll();