JDK-8263379 : JNI local refs exceeds capacity warning in NetworkInterface::getAll
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 17
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2021-03-10
  • Updated: 2021-03-17
  • Resolved: 2021-03-17
Related Reports
Cloners :  
Duplicate :  
Description
===
$ cat NITest.java
public class NITest {
    public static void main(String[] args) throws java.net.SocketException {
        java.net.NetworkInterface.getNetworkInterfaces();
    }
}
$ javac NITest.java
$ java -Xcheck:jni NITest
WARNING: JNI local refs: 33, exceeds capacity: 32
        at java.net.NetworkInterface.getAll(Native Method)
        at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:343)
        at NITest.main(NITest.java:5)
===

This is the same issue as JDK-8187450, but the relevant code has been refactored since JDK11, and so the fix will be different (I.e. the JDK11 fix will not be a direct backport from trunk). This bug is intended to be for Trunk.
Comments
Work for trunk is now going on under JDK-8187450, so closing this.
17-03-2021