From d6670149331bbdeda4b0573927c13d36225a09c1 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 04 十二月 2023 15:52:08 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java |   27 +++++++++------------------
 1 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java
index 13114af..cfa77d5 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java
@@ -4,7 +4,7 @@
 import org.apache.logging.log4j.Logger;
 
 /**
- * 闃熷垪锛屽厛杩涘厛鍑猴紝闈炵嚎绋嬪畨鍏�
+ * 闃熷垪锛屽厛杩涘厛鍑�
  */
 public class Queue {
 	@SuppressWarnings("unfinal")
@@ -62,7 +62,6 @@
 	 */
 	@SuppressWarnings("unused")
 	public void pushHead(NodeObj obj)throws Exception{
-		//涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣
 		synchronized(synObj){
 			if(obj == null){
 				return ;
@@ -90,7 +89,6 @@
 	 * @param obj 鍏ュ垪鐨勫璞�
 	 */
 	public void pushTail(NodeObj obj)throws Exception{
-		//涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣
 		synchronized(synObj){
 			if(obj == null){
 				return ;
@@ -118,7 +116,6 @@
 	 * @return 鍑哄垪瀵硅薄
 	 */
 	public NodeObj pop(){
-		//涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣
 		synchronized(synObj){
 			NodeObj obj = null ;
 			if(this.size > 0){
@@ -142,14 +139,11 @@
 	 */
 	@SuppressWarnings("unused")
 	public Node getFirstNode(){
-		//涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣
-		synchronized(synObj) {
-			Node node = this.head.next;
-			if (node != this.tail) {
-				return node;
-			}
-			return null;
+		Node node = this.head.next ;
+		if(node != this.tail){
+			return node ;
 		}
+		return null ;
 	}
 	/**
 	 * 寰楀埌鏈�鍚庝竴涓妭鐐癸紝浣嗕笉鎶婅妭鐐逛粠闃熷垪涓竻闄�
@@ -157,14 +151,11 @@
 	 */
 	@SuppressWarnings("unused")
 	public Node getLastNode(){
-		//涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣
-		synchronized(synObj) {
-			Node node = this.tail.pre;
-			if (node != this.head) {
-				return node;
-			}
-			return null;
+		Node node = this.tail.pre ;
+		if(node != this.head){
+			return node ;
 		}
+		return null ;
 	}
 	
 	/**

--
Gitblit v1.8.0