Skip to content

Commit

Permalink
Revert pom.xml changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
szetszwo committed Oct 7, 2024
1 parent 3b07ab9 commit 6c15124
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
<maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
<maven-clover2-plugin.version>4.0.6</maven-clover2-plugin.version>
<maven-pdf-plugin.version>1.6.1</maven-pdf-plugin.version>
<maven-surefire-plugin.version>3.5.1</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
<wagon-ssh.version>3.5.3</wagon-ssh.version>
<hadoop-maven-plugins.version>3.4.0</hadoop-maven-plugins.version>

Expand Down Expand Up @@ -223,8 +223,8 @@
<testsThreadCount>4</testsThreadCount>

<slf4j.version>2.0.7</slf4j.version>
<junit-bom.version>5.11.2</junit-bom.version>
<jacoco.version>0.8.12</jacoco.version>
<junit.jupiter.version>5.10.1</junit.jupiter.version>
<jacoco.version>0.8.11</jacoco.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -427,7 +427,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit-bom.version}</version>
<version>${junit.jupiter.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public void clear() {
}
}

/** Apply the given handler to each element and then {@link #clear()}. */
public void clear(Consumer<E> handler) {
try(AutoCloseableLock auto = AutoCloseableLock.acquire(lock)) {
for(E e : this) {
Expand All @@ -84,8 +85,13 @@ public void clear(Consumer<E> handler) {
}
}

/**
* Close this queue to stop accepting new elements, i.e. the offer(…) methods always return false.
* Note that closing the queue will not clear the existing elements.
* The existing elements can be peeked, polled or cleared after close.
*/
public void close() {
try(AutoCloseableLock auto = AutoCloseableLock.acquire(lock)) {
try(AutoCloseableLock ignored = AutoCloseableLock.acquire(lock)) {
closed = true;
}
}
Expand Down

0 comments on commit 6c15124

Please sign in to comment.