From cca976eccd745d094691dbabf41afb73f3857958 Mon Sep 17 00:00:00 2001 From: igor-suhorukov Date: Tue, 13 Mar 2018 00:59:18 +0300 Subject: [PATCH] Remove redundant "close" call Closing the resource is handled automatically by the try-with-resources. Closes gh-12453 --- .../boot/devtools/tunnel/client/TunnelClient.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java index c28c8841ca6..118736c813f 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 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. @@ -179,7 +179,6 @@ public class TunnelClient implements SmartInitializingSingleton { ByteBuffer buffer = ByteBuffer.allocate(BUFFER_SIZE); int amountRead = socketChannel.read(buffer); if (amountRead == -1) { - outputChannel.close(); return; } if (amountRead > 0) {