Skip to content

Commit e4525cf

Browse files
committed
Modify ByteArrayEncoder so that it works in Eclipse IDE
1 parent 898494a commit e4525cf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

spring-core/src/main/java/org/springframework/core/codec/ByteArrayEncoder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -52,7 +52,8 @@ public Flux<DataBuffer> encode(Publisher<? extends byte[]> inputStream,
5252
DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType,
5353
@Nullable Map<String, Object> hints) {
5454

55-
return Flux.from(inputStream).map(bytes -> {
55+
// The following (byte[] bytes) lambda signature declaration is necessary for Eclipse.
56+
return Flux.from(inputStream).map((byte[] bytes) -> {
5657
DataBuffer dataBuffer = bufferFactory.wrap(bytes);
5758
if (logger.isDebugEnabled() && !Hints.isLoggingSuppressed(hints)) {
5859
String logPrefix = Hints.getLogPrefix(hints);

src/checkstyle/checkstyle-suppressions.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<!-- spring-core -->
1919
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]org[\\/]springframework[\\/]asm[\\/]" checks=".*" />
2020
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]org[\\/]springframework[\\/]cglib[\\/]" checks=".*" />
21+
<suppress files="ByteArrayEncoder" checks="SpringLambda" />
2122
<suppress files="SocketUtils" checks="HideUtilityClassConstructor" />
2223
<suppress files="ResolvableType" checks="FinalClass" />
2324

0 commit comments

Comments
 (0)