Skip to content

Commit

Permalink
Remove autocloseable (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw authored Jan 23, 2024
1 parent 2184b4f commit 7814e18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
11 changes: 1 addition & 10 deletions core/src/main/java/com/softwaremill/jox/CloseableChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* <p>
* Closing the channel is thread-safe.
*/
public interface CloseableChannel extends AutoCloseable {
public interface CloseableChannel {
/**
* Close the channel, indicating that no more elements will be sent.
* <p>
Expand All @@ -40,15 +40,6 @@ public interface CloseableChannel extends AutoCloseable {
*/
Object doneSafe();

/**
* Same as {@link #done()}: close the channel, indicating that no more elements will be sent.
* <p>
* Enables using channel in {@code try-with-resources} blocks.
*/
default void close() {
done();
}

//

/**
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/com/softwaremill/jox/CollectSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ public Object doneSafe() {
return original.doneSafe();
}

@Override
public void close() {
original.close();
}

@Override
public void error(Throwable reason) {
original.error(reason);
Expand Down

0 comments on commit 7814e18

Please sign in to comment.