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 @@ -158,13 +158,14 @@ public Object invoke(MethodInvocation invocation) throws Throwable {
158
158
return isCollectionResult && !(nested instanceof Collection ) ? result : nested ;
159
159
}
160
160
161
- type = isCollectionResult && JsonPath .isPathDefinite (jsonPath )
161
+ boolean definitePath = JsonPath .isPathDefinite (jsonPath );
162
+ type = isCollectionResult && definitePath
162
163
? ResolvableType .forClassWithGenerics (List .class , type )
163
164
: type ;
164
165
165
166
List <?> result = (List <?>) context .read (jsonPath , new ResolvableTypeRef (type ));
166
167
167
- if (isCollectionResult && JsonPath . isPathDefinite ( jsonPath ) ) {
168
+ if (isCollectionResult && definitePath ) {
168
169
result = (List <?>) result .get (0 );
169
170
}
170
171
You can’t perform that action at this time.
0 commit comments