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
662e0b4b81
commit
523dc5c269
@ -88,7 +88,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…
Reference in New Issue
Block a user