Skip to content

Commit 02dc2df

Browse files
committed
Remove explicit close for AutoCloseable
Fixes warnings reported by javac.
1 parent 49c946c commit 02dc2df

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

org.eclipse.wildwebdeveloper/src/org/eclipse/wildwebdeveloper/debug/node/NodeAttachDebugDelegate.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2019 Red Hat Inc. and others.
2+
* Copyright (c) 2019, 2024 Red Hat Inc. and others.
33
*
44
* This program and the accompanying materials are made
55
* available under the terms of the Eclipse Public License 2.0
@@ -86,7 +86,6 @@ public void launch(ILaunchConfiguration configuration, String mode, ILaunch laun
8686
int port = 0;
8787
try (ServerSocket serverSocket = new ServerSocket(0)) {
8888
port = serverSocket.getLocalPort();
89-
serverSocket.close();
9089
} catch (IOException ex) {
9190
ILog.get().error(ex.getMessage(), ex);
9291
}

org.eclipse.wildwebdeveloper/src/org/eclipse/wildwebdeveloper/debug/node/VSCodeJSDebugDelegate.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018, 2023 Red Hat Inc. and others.
2+
* Copyright (c) 2018, 2024 Red Hat Inc. and others.
33
*
44
* This program and the accompanying materials are made
55
* available under the terms of the Eclipse Public License 2.0
@@ -168,7 +168,6 @@ public void launch(ILaunchConfiguration configuration, String mode, ILaunch laun
168168
int port = 0;
169169
try (ServerSocket serverSocket = new ServerSocket(0)) {
170170
port = serverSocket.getLocalPort();
171-
serverSocket.close();
172171
} catch (IOException ex) {
173172
ILog.get().error(ex.getMessage(), ex);
174173
}

0 commit comments

Comments
 (0)