Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7076523

[TEST_BUG]: test/java/net/NetworkInterface/NetParamsTest.java can fail with NPE

XMLWordPrintable

    • b04
    • generic
    • generic
    • Verified

        The test test/java/net/NetworkInterface/NetParamsTest.java can fail under certain circumstances. The test is merely printing out a bunch of information about network interfaces, and apparently it assumes that if an interface is virtual that it must have a non-null parent interface. This seems not to be the case when running within a Solaris Zone (where presumably all the network interfaces are virtual and have no parents).

        The information from the test log is as follows:

        =======
        # uname -a:
        # SunOS sc11136019 5.10 Generic_142909-17 sun4u sparc SUNW,Netra-T12
        =======
        ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.NullPointerException
        REASON: Assumed action based on file name: run main NetParamsTest
        TIME: 0.007 seconds
        messages:
        command: main NetParamsTest
        reason: Assumed action based on file name: run main NetParamsTest
        elapsed time (seconds): 0.007
        STDOUT:
        ce0:1 :
        Status: UP
        Hardware Address: 0:14:4f:50:ffffffa4:7d:
        Loopback: false
        Point to Point: false
        Virtual: true
        STDERR:
        java.lang.NullPointerException
        at NetParamsTest.printIF(NetParamsTest.java:48)
        at NetParamsTest.main(NetParamsTest.java:69)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
        at java.lang.Thread.run(Thread.java:722)
        =======

              chegar Chris Hegarty
              smarks Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: