Skip to content

Commit

Permalink
fix(s3stream): checkstyle
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Han <hanxvdovehx@gmail.com>
  • Loading branch information
superhx committed Oct 26, 2023
1 parent c751dcd commit d48b365
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class DirectByteBufAlloc {
private static final Logger LOGGER = LoggerFactory.getLogger(DirectByteBufAlloc.class);
private static final PooledByteBufAllocator ALLOC = PooledByteBufAllocator.DEFAULT;
private static final List<OOMHandler> OOMHandlers = new ArrayList<>();
private static final List<OOMHandler> oomHandlers = new ArrayList<>();

public static CompositeByteBuf compositeByteBuffer() {
return ALLOC.compositeDirectBuffer(Integer.MAX_VALUE);
Expand All @@ -41,7 +41,7 @@ public static ByteBuf byteBuffer(int initCapacity) {
} catch (OutOfMemoryError e) {
for (;;) {
int freedBytes = 0;
for (OOMHandler handler : OOMHandlers) {
for (OOMHandler handler : oomHandlers) {
freedBytes += handler.handle(initCapacity);
try {
ByteBuf buf = ALLOC.directBuffer(initCapacity);
Expand All @@ -60,7 +60,7 @@ public static ByteBuf byteBuffer(int initCapacity) {
}

public static void registerOOMHandlers(OOMHandler handler) {
OOMHandlers.add(handler);
oomHandlers.add(handler);
}

public interface OOMHandler {
Expand Down

0 comments on commit d48b365

Please # to comment.