Skip to content

Commit 3c4fee4

Browse files
committed
fix build
1 parent 3864bdd commit 3c4fee4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
6363

6464
try {
6565
nsPath = Files.readSymbolicLink(SELF.resolve(NS_MNT));
66-
} catch (IOException _) {
66+
} catch (IOException e) {
6767
// do nothing
6868
} finally {
6969
SELF_MNT_NS = Optional.ofNullable(nsPath);
@@ -248,7 +248,7 @@ private File createAttachFile(long pid, long ns_pid) throws AttachNotSupportedEx
248248
try {
249249
// Do not canonicalize the file path, or we will fail to attach to a VM in a container.
250250
f.createNewFile();
251-
} catch (IOException _) {
251+
} catch (IOException e) {
252252
f = new File(findTargetProcessTmpDirectory(pid, ns_pid), fn.toString());
253253
f.createNewFile();
254254
}
@@ -277,7 +277,7 @@ private String findTargetProcessTmpDirectory(long pid, long ns_pid) throws Attac
277277
try {
278278
// attempt to read the target's mnt ns id
279279
targetMountNS = Optional.ofNullable(Files.readSymbolicLink(procPidPath.resolve(NS_MNT)));
280-
} catch (IOException _) {
280+
} catch (IOException e) {
281281
// if we fail to read the target's mnt ns id then we either don't have access or it no longer exists!
282282
if (!Files.exists(procPidPath)) {
283283
throw new IOException(String.format("unable to attach, %s non-existent! process: %d terminated", procPidPath, pid));
@@ -303,7 +303,7 @@ private String findTargetProcessTmpDirectory(long pid, long ns_pid) throws Attac
303303
try {
304304
// attempt to read the target's pid ns id
305305
curPidNS = Optional.ofNullable(Files.readSymbolicLink(procPidPath.resolve(NS_PID)));
306-
} catch (IOException _) {
306+
} catch (IOException e) {
307307
// if we fail to read the target's pid ns id then we either don't have access or it no longer exists!
308308
if (!Files.exists(procPidPath)) {
309309
throw new IOException(String.format("unable to attach, %s non-existent! process: %d terminated", procPidPath, pid));

0 commit comments

Comments
 (0)