ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49173] New: Telnet task is broken on read
Date Fri, 23 Apr 2010 01:32:53 GMT

           Summary: Telnet task is broken on read
           Product: Ant
           Version: 1.8.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks


The two instances of while-loops currently written like this

while (windowStart++ < 0 
    || !sb.substring(windowStart).equals(s)) {

are wrong. The increment happens before taking the substring. Changing it to

while (windowStart < 0 
    || !sb.substring(windowStart).equals(s)) {

makes it clearer when windowStart is incremented, and makes the code correct. 

Debugging the code while doing the classic case, looking for "ogin:" before
typing the username demonstrates that the comparison will be "ogin:" to "gin:"
at the iteration when it should break out of the loop, making the loop
invariant true.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message