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

(dc) Promiscuous.java fails with NumberFormatException due to network interference

XMLWordPrintable

    • b65

        java/nio/channels/DatagramChannel/Promiscuous.java

        This test has the same issue as JDK-8076644:

        When the received bytes are not parseable into an Integer, expected id, the packet should be ignored and the test should continue. Additionally, the test should attempt to reconstruct the String message with the same charset as is used to convert the original message to bytes, UTF-8.

        The following exception was seen during testing (because of this bug) JDK9/b61:
        ----------System.err:(18/1242)*----------
        java.lang.NumberFormatException: For input string: "\u0001\u0002\u0003\u0005"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:567)
        at java.lang.Integer.parseInt(Integer.java:699)
        at Promiscuous.receiveDatagram(Promiscuous.java:111)
        at Promiscuous.test(Promiscuous.java:169)
        at Promiscuous.main(Promiscuous.java:207)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:502)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
        at java.lang.Thread.run(Thread.java:745)

              amlu Amy Lu (Inactive)
              amlu Amy Lu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: