Skip to content

Commit b60f5d8

Browse files
committed
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.
1 parent de4f1ff commit b60f5d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/springframework/data/repository/query/Parameters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public abstract class Parameters<S extends Parameters<S, T>, T extends Parameter
4545
private static final String ALL_OR_NOTHING = String.format("Either use @%s "
4646
+ "on all parameters except %s and %s typed once, or none at all!", Param.class.getSimpleName(),
4747
Pageable.class.getSimpleName(), Sort.class.getSimpleName());
48-
private static final ParameterNameDiscoverer PARAMETER_DISCOVERER = new DefaultParameterNameDiscoverer();
4948

49+
private final ParameterNameDiscoverer PARAMETER_DISCOVERER = new DefaultParameterNameDiscoverer();
5050
private final int pageableIndex;
5151
private final int sortIndex;
5252
private final List<T> parameters;

0 commit comments

Comments
 (0)