8
8
9
9
import java .io .IOException ;
10
10
import java .io .Serializable ;
11
+ import java .util .Arrays ;
11
12
import java .util .Objects ;
12
13
import java .util .Set ;
13
14
@@ -65,7 +66,7 @@ public static QueryKey from(
65
66
private final Integer firstRow ;
66
67
private final Integer maxRows ;
67
68
private final String tenantIdentifier ;
68
- private final Set < String > enabledFilterNames ;
69
+ private final String [] enabledFilterNames ;
69
70
70
71
/**
71
72
* For performance reasons, the hashCode is cached; however, it is marked transient so that it can be
@@ -85,7 +86,7 @@ public QueryKey(
85
86
this .firstRow = firstRow ;
86
87
this .maxRows = maxRows ;
87
88
this .tenantIdentifier = tenantIdentifier ;
88
- this .enabledFilterNames = enabledFilterNames ;
89
+ this .enabledFilterNames = enabledFilterNames . toArray ( String []:: new ) ;
89
90
this .hashCode = generateHashCode ();
90
91
}
91
92
@@ -110,7 +111,7 @@ private int generateHashCode() {
110
111
// result = 37 * result + ( maxRows==null ? 0 : maxRows );
111
112
result = 37 * result + ( tenantIdentifier ==null ? 0 : tenantIdentifier .hashCode () );
112
113
result = 37 * result + parameterBindingsMemento .hashCode ();
113
- result = 37 * result + ( enabledFilterNames == null ? 0 : enabledFilterNames .hashCode () );
114
+ result = 37 * result + Arrays .hashCode ( enabledFilterNames );
114
115
return result ;
115
116
}
116
117
@@ -146,7 +147,7 @@ public boolean equals(Object other) {
146
147
return false ;
147
148
}
148
149
149
- if ( ! Objects .equals ( enabledFilterNames , that .enabledFilterNames ) ) {
150
+ if ( ! Arrays .equals ( enabledFilterNames , that .enabledFilterNames ) ) {
150
151
return false ;
151
152
}
152
153
0 commit comments