Skip to content

Commit cc8ded7

Browse files
committed
refactor: 优化对象池
1 parent be69c79 commit cc8ded7

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

hsweb-core/src/main/java/org/hswebframework/web/recycler/Recyclable.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
*
4646
* @param <T> 被包装的对象类型
4747
* @author zhouhao
48-
* @since 5.0.1
4948
* @see Recycler
5049
* @see Recycler#take(boolean)
50+
* @since 5.0.1
5151
*/
5252
public interface Recyclable<T> extends AutoCloseable {
5353

@@ -98,11 +98,9 @@ public interface Recyclable<T> extends AutoCloseable {
9898
*
9999
* <p>默认实现直接调用 {@link #recycle()} 方法,使得可以在 try-with-resources
100100
* 语句中自动回收对象。
101-
*
102-
* @throws Exception 如果回收过程中发生异常
103101
*/
104102
@Override
105-
default void close() throws Exception {
103+
default void close() {
106104
recycle();
107105
}
108106
}

hsweb-core/src/main/java/org/hswebframework/web/recycler/Recycler.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package org.hswebframework.web.recycler;
22

3-
import reactor.function.Function3;
4-
import reactor.function.Function4;
5-
import reactor.function.Function5;
6-
import reactor.function.Function6;
3+
import reactor.function.*;
74

85
import java.util.function.BiFunction;
96
import java.util.function.Consumer;

0 commit comments

Comments
 (0)