Fix #10378,ResourceLeakDetectorFactory.newResourceLeakDetector(Class, int) ignores sampling interval#10383
Conversation
…lass, int) ignores sampling interval
|
Can one of the admins verify this patch? |
3 similar comments
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
| * | ||
| * @param resource the resource class used to initialize the {@link ResourceLeakDetector} | ||
| * @param <T> the type of the resource class | ||
| * @param <T> the type of the resource class |
There was a problem hiding this comment.
Can you please revert any change which is just reformatting ?
There was a problem hiding this comment.
ok,i will revert any code format
There was a problem hiding this comment.
Sorry, forgive me for not understanding the formatting style of netty code, if there is pr in the future, I will pay attention to this
This reverts commit 87531c7
|
@skyguard1 can you please sign our icla and let me know once done ? |
|
@netty-bot test this please |
| */ | ||
| @SuppressWarnings("deprecation") | ||
| public <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval) { | ||
| return newResourceLeakDetector(resource, ResourceLeakDetector.SAMPLING_INTERVAL, Long.MAX_VALUE); |
There was a problem hiding this comment.
What about to add a check ObjectUtil.checkPositive(samplingInterval, "samplingInterval") ?
There was a problem hiding this comment.
Yes, this is feasible. It is possible that this parameter is the user's configuration. Is it appropriate to make an assertion here?@normanmaurer
Yes, I have finished signing my name |
|
@netty-bot test this please |
|
@skyguard1 thanks a lot |
… int) ignores sampling interval (#10383) Motivation: newResourceLeakDetector(...) did not correctly pass the samplingInterval parameter and so it was ignored. Modification: ResourceLeakDetectorFactory.newResourceLeakDetector(Class, int) use the second parameter as the sampling interval of the newly created ResourceLeakDetector. Result: Fixes #10378
a piece of cake,you are really kind,appreciate it |
|
Thanks, @skyguard1 and @normanmaurer 😄 |
* '4.1' of github.com:netty/netty: Correctly include TLS1.3 ciphers in the enabled ciphersuites when using BoringSSL (netty#10388) Fix netty#10378,ResourceLeakDetectorFactory.newResourceLeakDetector(Class, int) ignores sampling interval (netty#10383)
…lass, int) ignores sampling interval (netty#10383) Motivation: newResourceLeakDetector(...) did not correctly pass the samplingInterval parameter and so it was ignored. Modification: ResourceLeakDetectorFactory.newResourceLeakDetector(Class, int) use the second parameter as the sampling interval of the newly created ResourceLeakDetector. Result: Fixes netty#10378
Motivation:
As described in #10378 this issue, a simple question, please review this pr, thank you
Modification:
ResourceLeakDetectorFactory.newResourceLeakDetector(Class, int) use the second parameter as the sampling interval of the newly created ResourceLeakDetector.
Result:
Fixes #10378
If there is no issue then describe the changes introduced by this PR.