From e4525cf4c1628940c36d62aff01e976d5432324d Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 5 Apr 2019 19:27:11 +0200 Subject: [PATCH] Modify ByteArrayEncoder so that it works in Eclipse IDE --- .../org/springframework/core/codec/ByteArrayEncoder.java | 5 +++-- src/checkstyle/checkstyle-suppressions.xml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/codec/ByteArrayEncoder.java b/spring-core/src/main/java/org/springframework/core/codec/ByteArrayEncoder.java index a69d2ba252..6b538dbf7e 100644 --- a/spring-core/src/main/java/org/springframework/core/codec/ByteArrayEncoder.java +++ b/spring-core/src/main/java/org/springframework/core/codec/ByteArrayEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,8 @@ public class ByteArrayEncoder extends AbstractEncoder { DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map hints) { - return Flux.from(inputStream).map(bytes -> { + // The following (byte[] bytes) lambda signature declaration is necessary for Eclipse. + return Flux.from(inputStream).map((byte[] bytes) -> { DataBuffer dataBuffer = bufferFactory.wrap(bytes); if (logger.isDebugEnabled() && !Hints.isLoggingSuppressed(hints)) { String logPrefix = Hints.getLogPrefix(hints); diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index 20355277bc..c3cb44210a 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -18,6 +18,7 @@ +