mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8225235: Unused field defaultIndex in NetworkInterface
Reviewed-by: chegar, vtewari, dfuchs, jpai
This commit is contained in:
parent
a07975bf3e
commit
b030c7de32
2 changed files with 2 additions and 11 deletions
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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 NetworkInterface parent = null;
|
||||||
private boolean virtual = false;
|
private boolean virtual = false;
|
||||||
private static final NetworkInterface defaultInterface;
|
private static final NetworkInterface defaultInterface;
|
||||||
private static final int defaultIndex; /* index of defaultInterface */
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
jdk.internal.loader.BootLoader.loadLibrary("net");
|
jdk.internal.loader.BootLoader.loadLibrary("net");
|
||||||
|
|
||||||
init();
|
init();
|
||||||
defaultInterface = DefaultInterface.getDefault();
|
defaultInterface = DefaultInterface.getDefault();
|
||||||
if (defaultInterface != null) {
|
|
||||||
defaultIndex = defaultInterface.getIndex();
|
|
||||||
} else {
|
|
||||||
defaultIndex = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -101,7 +101,6 @@ jfieldID ni_bindsID;
|
||||||
jfieldID ni_virutalID;
|
jfieldID ni_virutalID;
|
||||||
jfieldID ni_childsID;
|
jfieldID ni_childsID;
|
||||||
jfieldID ni_parentID;
|
jfieldID ni_parentID;
|
||||||
jfieldID ni_defaultIndexID;
|
|
||||||
jmethodID ni_ctrID;
|
jmethodID ni_ctrID;
|
||||||
|
|
||||||
static jclass ni_ibcls;
|
static jclass ni_ibcls;
|
||||||
|
@ -187,9 +186,7 @@ JNIEXPORT void JNICALL Java_java_net_NetworkInterface_init
|
||||||
CHECK_NULL(ni_ib4broadcastID);
|
CHECK_NULL(ni_ib4broadcastID);
|
||||||
ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S");
|
ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S");
|
||||||
CHECK_NULL(ni_ib4maskID);
|
CHECK_NULL(ni_ib4maskID);
|
||||||
ni_defaultIndexID = (*env)->GetStaticFieldID(env, ni_class, "defaultIndex",
|
|
||||||
"I");
|
|
||||||
CHECK_NULL(ni_defaultIndexID);
|
|
||||||
initInetAddressIDs(env);
|
initInetAddressIDs(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue