8225235: Unused field defaultIndex in NetworkInterface

Reviewed-by: chegar, vtewari, dfuchs, jpai
This commit is contained in:
Viktor Klang 2022-09-30 03:06:36 +00:00 committed by Jaikiran Pai
parent a07975bf3e
commit b030c7de32
2 changed files with 2 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -53,18 +53,12 @@ public final class NetworkInterface {
private NetworkInterface parent = null;
private boolean virtual = false;
private static final NetworkInterface defaultInterface;
private static final int defaultIndex; /* index of defaultInterface */
static {
jdk.internal.loader.BootLoader.loadLibrary("net");
init();
defaultInterface = DefaultInterface.getDefault();
if (defaultInterface != null) {
defaultIndex = defaultInterface.getIndex();
} else {
defaultIndex = 0;
}
}
/**