Infinite loop in AgentServer

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • generic
    • generic

      In AgentServer.java, there is this piece of code:

               private void decode() throws IOException {
                   byteBuffer.flip();
                   CoderResult cr;
                   while ((cr = decoder.decode(byteBuffer, charBuffer, false)) != CoderResult.UNDERFLOW) {
                       writeCharBuffer();
                   }
                   byteBuffer.compact();
               }
      The while loop only exits if the decode() returns UNDERFLOW, which may not be true in some occasions, because the encoding used here and the output from the agent VM may differ, decode() may return malformed/unmapped error. Then it will become an infinite loop here.

            Assignee:
            Naoto Sato
            Reporter:
            Naoto Sato
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: