Skip to content

Commit f140754

Browse files
committed
Don't use pattern matching in instanceof
The pattern matching for `instanceof` is available since Java 16
1 parent 25e763d commit f140754

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-integration-http/src/main/java/org/springframework/integration/http/outbound/AbstractHttpRequestExecutingMessageHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ private boolean isMultipart(Map<String, ?> map) {
471471
if (value.getClass().isArray()) {
472472
value = CollectionUtils.arrayToList(value);
473473
}
474-
if (value instanceof Collection<?> cValues) {
474+
if (value instanceof Collection) {
475+
Collection<?> cValues = (Collection<?>) value;
475476
for (Object cValue : cValues) {
476477
if (cValue != null && !(cValue instanceof String)) {
477478
return true;

0 commit comments

Comments
 (0)