Renamed DataBufferUtils/DataBufferFactory.compose to join

Issue: SPR-16365
This commit is contained in:
Arjen Poutsma
2018-01-22 10:50:13 +01:00
parent 3f3141cdda
commit 0befc60c8f
16 changed files with 42 additions and 37 deletions

View File

@@ -457,7 +457,7 @@ class DefaultWebClient implements WebClient {
private static Mono<WebClientResponseException> createResponseException(ClientResponse response) {
return DataBufferUtils.compose(response.body(BodyExtractors.toDataBuffers()))
return DataBufferUtils.join(response.body(BodyExtractors.toDataBuffers()))
.map(dataBuffer -> {
byte[] bytes = new byte[dataBuffer.readableByteCount()];
dataBuffer.read(bytes);

View File

@@ -112,7 +112,7 @@ public class AppCacheManifestTransformer extends ResourceTransformerSupport {
DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory();
Flux<DataBuffer> flux = DataBufferUtils
.read(outputResource, bufferFactory, StreamUtils.BUFFER_SIZE);
return DataBufferUtils.compose(flux)
return DataBufferUtils.join(flux)
.flatMap(dataBuffer -> {
CharBuffer charBuffer = DEFAULT_CHARSET.decode(dataBuffer.asByteBuffer());
DataBufferUtils.release(dataBuffer);

View File

@@ -46,7 +46,7 @@ public class ContentVersionStrategy extends AbstractFileNameVersionStrategy {
public Mono<String> getResourceVersion(Resource resource) {
Flux<DataBuffer> flux =
DataBufferUtils.read(resource, dataBufferFactory, StreamUtils.BUFFER_SIZE);
return DataBufferUtils.compose(flux)
return DataBufferUtils.join(flux)
.map(buffer -> {
byte[] result = new byte[buffer.readableByteCount()];
buffer.read(result);

View File

@@ -89,7 +89,7 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport {
DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory();
Flux<DataBuffer> flux = DataBufferUtils
.read(ouptputResource, bufferFactory, StreamUtils.BUFFER_SIZE);
return DataBufferUtils.compose(flux)
return DataBufferUtils.join(flux)
.flatMap(dataBuffer -> {
CharBuffer charBuffer = DEFAULT_CHARSET.decode(dataBuffer.asByteBuffer());
DataBufferUtils.release(dataBuffer);

View File

@@ -332,7 +332,7 @@ public class BodyInsertersTests {
Mono<Void> result = inserter.insert(request, this.context);
StepVerifier.create(result).expectComplete().verify();
StepVerifier.create(DataBufferUtils.compose(request.getBody()))
StepVerifier.create(DataBufferUtils.join(request.getBody()))
.consumeNextWith(dataBuffer -> {
byte[] resultBytes = new byte[dataBuffer.readableByteCount()];
dataBuffer.read(resultBytes);