Add ByteBuf leak detection @Rule
This commit introduces a JUnit rule that detects ByteBuf leaks in subclasses of AbstractDataBufferAllocatingTestCase.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,6 +49,12 @@ public class NettyDataBufferFactory implements DataBufferFactory {
|
||||
this.byteBufAllocator = byteBufAllocator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the {@code ByteBufAllocator} used by this factory.
|
||||
*/
|
||||
public ByteBufAllocator getByteBufAllocator() {
|
||||
return this.byteBufAllocator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NettyDataBuffer allocateBuffer() {
|
||||
|
||||
Reference in New Issue
Block a user