Update reactor

This commit is contained in:
Andrea Cavalli 2022-05-21 15:29:48 +02:00
parent 242bd588c6
commit 1e1ccff846
2 changed files with 6 additions and 6 deletions

View File

@ -105,12 +105,12 @@
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.4.13</version>
<version>3.4.18</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>3.4.13</version>
<version>3.4.18</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -216,8 +216,8 @@ public class DiskCache implements URLsDiskHandler, URLsWriter {
var blockKeyMono = Mono.fromCallable(() -> getBlockKey(url, blockId));
return fileContent
.get(null, blockKeyMono)
.map(dataToReceive -> {
try (var data = dataToReceive) {
.map(data -> {
try (data) {
int blockOffset = getBlockOffset(blockId);
int blockLength = data.readableBytes();
if (meta.size() != -1) {
@ -254,8 +254,8 @@ public class DiskCache implements URLsDiskHandler, URLsWriter {
Mono<Buffer> urlKeyMono = Mono.fromCallable(() -> serializeUrl(url));
return fileMetadata
.get(null, urlKeyMono)
.map(prevBytesSend -> {
try (var prevBytes = prevBytesSend) {
.map(prevBytes -> {
try (prevBytes) {
return deserializeMetadata(prevBytes);
}
});