Fix #10378,ResourceLeakDetectorFactory.newResourceLeakDetector(Class, 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
This commit is contained in:
parent
91c75a4a8f
commit
95f9694150
@ -89,7 +89,8 @@ public abstract class ResourceLeakDetectorFactory {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval) {
|
public <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval) {
|
||||||
return newResourceLeakDetector(resource, ResourceLeakDetector.SAMPLING_INTERVAL, Long.MAX_VALUE);
|
ObjectUtil.checkPositive(samplingInterval, "samplingInterval");
|
||||||
|
return newResourceLeakDetector(resource, samplingInterval, Long.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user