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

SelectorProvider.openDatagramChannel() throws java.lang.IllegalStateException

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description



      -------------------Please Note ----------------

      After testing once again I found that this test is failing also on solaris 6, 7 and 8 with the same error.

      ------------------------------------------------------

      This failure occurs with Merlin b61 on windows platforms ( I tested with win98 , winNT and win2000 ).The same is passing with Merlin b60 on the above mentioned windows platforms.

      With Merlin b61 this is passing on solaris 7 and solaris 8.


      ---------testcode--------

       public boolean SelectorProviderOpenDC(SelectorProvider sp) {

      String testName = "SelectorProvider.openDatagramChannel()" ;
       
        // positive test: make sure openDatagramChannel() throws no IOException.
      try {
      int portNum = 9999 ; // some random number
      java.nio.DatagramChannel dc = sp.openDatagramChannel(portNum);
      System.out.println("DatagramChannel: " + dc);
      return TestHelper.testPass(testName + " PASS");
      } catch (IOException e) {
      return TestHelper.testFail(testName +
      " FAIL : unexpected IOException ! ", e) ;
      } catch (Exception e) {
      return TestHelper.testFail(testName +
      " FAIL : unexpected Exception ! ", e) ;
      }
       
          }




      --------results-----------


      java.lang.IllegalStateException: Connect already invoked
      at sun.nio.ch.DatagramChannelImpl.ensureOpenAndUnconnected(DatagramChannelImpl.java:258)
      at sun.nio.ch.ChannelDatagramSocket.bind(ChannelDatagramSocket.java:89)
      at sun.nio.ch.ChannelDatagramSocket.create(ChannelDatagramSocket.java:62)
      at sun.nio.ch.DatagramChannelImpl.<init>(DatagramChannelImpl.java:43)
      at sun.nio.ch.SelectorProviderImpl.openDatagramChannel(SelectorProviderImpl.java:25)
      at openTest.SelectorProviderOpenDC(openTest.java:113)
      at openTest.SelectorProviderOpenTest01(openTest.java:215)
      at openTest.go(openTest.java:66)
      at openTest.main(openTest.java:43)
      TestFailException: SelectorProviderOpenTest FAIL
      at TestHelper.testFail(TestHelper.java:70)
      at openTest.SelectorProviderOpenTest01(openTest.java:224)
      at openTest.go(openTest.java:66)
      at openTest.main(openTest.java:43)



        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mmcclosksunw Michael Mccloskey (Inactive)
              Reporter:
              saksunw Sreejith Ak (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: