@@ -107,11 +107,11 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) {
107
107
108
108
Map <String , Object > pathSpecMap = getPathSpec (bindings , "pathSpecs" );
109
109
//remove blacklisted fields
110
- Set <String > blacklist = getFieldValues (bindings , "denyList" );
110
+ Set <String > blacklist = getFieldValues (bindings , "denyList" , "blackList" );
111
111
fieldsToAdd .removeIf (blacklist ::contains );
112
112
113
- Set <String > whiteList = getFieldValues (bindings , "allowList" );
114
- Set <String > aliases = getFieldValues (bindings , "aliases" );
113
+ Set <String > whiteList = getFieldValues (bindings , "allowList" , "whiteList" );
114
+ Set <String > aliases = getFieldValues (bindings , "aliases" , null );
115
115
116
116
fieldsToAdd .addAll (aliases );
117
117
fieldsToAdd .addAll (whiteList );
@@ -152,10 +152,13 @@ private QuerydslBindings extractQdslBindings(QuerydslPredicate predicate) {
152
152
* @param fieldName the field name
153
153
* @return the field values
154
154
*/
155
- private Set <String > getFieldValues (QuerydslBindings instance , String fieldName ) {
155
+ private Set <String > getFieldValues (QuerydslBindings instance , String fieldName , String alternativeFieldName ) {
156
156
try {
157
- Field field = FieldUtils .getDeclaredField (instance .getClass (),fieldName ,true );
158
- return (Set <String >) field .get (instance );
157
+ Field field = FieldUtils .getDeclaredField (instance .getClass (), fieldName , true );
158
+ if (field == null && alternativeFieldName != null )
159
+ field = FieldUtils .getDeclaredField (instance .getClass (), alternativeFieldName , true );
160
+ if (field != null )
161
+ return (Set <String >) field .get (instance );
159
162
}
160
163
catch (IllegalAccessException e ) {
161
164
LOGGER .warn (e .getMessage ());
@@ -172,7 +175,7 @@ private Set<String> getFieldValues(QuerydslBindings instance, String fieldName)
172
175
*/
173
176
private Map <String , Object > getPathSpec (QuerydslBindings instance , String fieldName ) {
174
177
try {
175
- Field field = FieldUtils .getDeclaredField (instance .getClass (),fieldName ,true );
178
+ Field field = FieldUtils .getDeclaredField (instance .getClass (), fieldName , true );
176
179
return (Map <String , Object >) field .get (instance );
177
180
}
178
181
catch (IllegalAccessException e ) {
@@ -192,7 +195,7 @@ private Optional<Path<?>> getPathFromPathSpec(Object instance) {
192
195
if (instance == null ) {
193
196
return Optional .empty ();
194
197
}
195
- Field field = FieldUtils .getDeclaredField (instance .getClass (),"path" ,true );
198
+ Field field = FieldUtils .getDeclaredField (instance .getClass (), "path" , true );
196
199
return (Optional <Path <?>>) field .get (instance );
197
200
}
198
201
catch (IllegalAccessException e ) {
0 commit comments