Skip to content

Commit 94f9207

Browse files
author
bnasslahsen
committed
upgrade spring-boot version to 2.3.2.RELEASE. Fixes #806
1 parent d75d392 commit 94f9207

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
ext {
11-
springBootVersion = '2.3.0.RELEASE'
11+
springBootVersion = '2.3.2.RELEASE'
1212
swaggerApiVersion = '2.1.4'
1313
swaggerUiVersion = '3.30.0'
1414
}

springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/customisers/QuerydslPredicateOperationCustomizer.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ private QuerydslBindings extractQdslBindings(QuerydslPredicate predicate) {
154154
*/
155155
private Set<String> getFieldValues(QuerydslBindings instance, String fieldName) {
156156
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)
159+
return (Set<String>) field.get(instance);
159160
}
160161
catch (IllegalAccessException e) {
161162
LOGGER.warn(e.getMessage());
@@ -172,7 +173,7 @@ private Set<String> getFieldValues(QuerydslBindings instance, String fieldName)
172173
*/
173174
private Map<String, Object> getPathSpec(QuerydslBindings instance, String fieldName) {
174175
try {
175-
Field field = FieldUtils.getDeclaredField(instance.getClass(),fieldName,true);
176+
Field field = FieldUtils.getDeclaredField(instance.getClass(), fieldName, true);
176177
return (Map<String, Object>) field.get(instance);
177178
}
178179
catch (IllegalAccessException e) {
@@ -192,7 +193,7 @@ private Optional<Path<?>> getPathFromPathSpec(Object instance) {
192193
if (instance == null) {
193194
return Optional.empty();
194195
}
195-
Field field = FieldUtils.getDeclaredField(instance.getClass(),"path",true);
196+
Field field = FieldUtils.getDeclaredField(instance.getClass(), "path", true);
196197
return (Optional<Path<?>>) field.get(instance);
197198
}
198199
catch (IllegalAccessException e) {

springdoc-openapi-data-rest/src/test/resources/results/app5.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333
}
3434
}
3535
},
36+
{
37+
"name": "codeISO3166",
38+
"in": "query",
39+
"schema": {
40+
"type": "string"
41+
}
42+
},
3643
{
3744
"name": "code",
3845
"in": "query",
@@ -69,6 +76,13 @@
6976
"type": "string"
7077
}
7178
},
79+
{
80+
"name": "dialingCode",
81+
"in": "query",
82+
"schema": {
83+
"type": "string"
84+
}
85+
},
7286
{
7387
"name": "status",
7488
"in": "query",

0 commit comments

Comments
 (0)