Skip to content

Commit

Permalink
Avoid dependency on netty-common in DataBufferUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev authored and kenny5he committed Jun 21, 2020
1 parent ee34fdf commit a48e4be
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -39,7 +39,6 @@
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;

import io.netty.util.IllegalReferenceCountException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.reactivestreams.Publisher;
Expand Down Expand Up @@ -502,9 +501,10 @@ public static boolean release(@Nullable DataBuffer dataBuffer) {
try {
return pooledDataBuffer.release();
}
catch (IllegalReferenceCountException ex) {
catch (IllegalStateException ex) {
// Avoid dependency on Netty: IllegalReferenceCountException
if (logger.isDebugEnabled()) {
logger.debug("RefCount already at 0", ex);
logger.debug("Failed to release PooledDataBuffer", ex);
}
return false;
}
Expand Down

0 comments on commit a48e4be

Please sign in to comment.