DATACMNS-648 - Parameters now holds a non-static ParameterNameDiscoverer.

Turned the previously static ParameterNameDiscoverer into an instance variable to make sure the instance can be GCed correctly.
This commit is contained in:
Oliver Gierke
2015-06-15 18:01:42 +02:00
parent fd9866284f
commit 06e17ed320

View File

@@ -45,7 +45,7 @@ public abstract class Parameters<S extends Parameters<S, T>, T extends Parameter
private static final String ALL_OR_NOTHING = String.format("Either use @%s "
+ "on all parameters except %s and %s typed once, or none at all!", Param.class.getSimpleName(),
Pageable.class.getSimpleName(), Sort.class.getSimpleName());
private static final ParameterNameDiscoverer PARAMETER_DISCOVERER = ReflectionUtils.createInstanceIfPresent(
private final ParameterNameDiscoverer PARAMETER_DISCOVERER = ReflectionUtils.createInstanceIfPresent(
"org.springframework.core.DefaultParameterNameDiscoverer", new LocalVariableTableParameterNameDiscoverer());
private final int pageableIndex;