File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/org/springframework/data/web Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -156,13 +156,14 @@ public Object invoke(@SuppressWarnings("null") MethodInvocation invocation) thro
156156 return isCollectionResult && !(nested instanceof Collection ) ? result : nested ;
157157 }
158158
159- type = isCollectionResult && JsonPath .isPathDefinite (jsonPath )
159+ boolean definitePath = JsonPath .isPathDefinite (jsonPath );
160+ type = isCollectionResult && definitePath
160161 ? ResolvableType .forClassWithGenerics (List .class , type )
161162 : type ;
162163
163164 List <?> result = (List <?>) context .read (jsonPath , new ResolvableTypeRef (type ));
164165
165- if (isCollectionResult && JsonPath . isPathDefinite ( jsonPath ) ) {
166+ if (isCollectionResult && definitePath ) {
166167 result = (List <?>) result .get (0 );
167168 }
168169
You can’t perform that action at this time.
0 commit comments