File tree 1 file changed +3
-3
lines changed
spring-core/src/main/java/org/springframework/core/io/buffer
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 39
39
import java .util .concurrent .atomic .AtomicReference ;
40
40
import java .util .function .Consumer ;
41
41
42
- import io .netty .util .IllegalReferenceCountException ;
43
42
import org .apache .commons .logging .Log ;
44
43
import org .apache .commons .logging .LogFactory ;
45
44
import org .reactivestreams .Publisher ;
@@ -502,9 +501,10 @@ public static boolean release(@Nullable DataBuffer dataBuffer) {
502
501
try {
503
502
return pooledDataBuffer .release ();
504
503
}
505
- catch (IllegalReferenceCountException ex ) {
504
+ catch (IllegalStateException ex ) {
505
+ // Avoid dependency on Netty: IllegalReferenceCountException
506
506
if (logger .isDebugEnabled ()) {
507
- logger .debug ("RefCount already at 0 " , ex );
507
+ logger .debug ("Failed to release PooledDataBuffer " , ex );
508
508
}
509
509
return false ;
510
510
}
You can’t perform that action at this time.
0 commit comments