You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/04/23 03:32:53 UTC

DO NOT REPLY [Bug 49173] New: Telnet task is broken on read

https://issues.apache.org/bugzilla/show_bug.cgi?id=49173

           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
        AssignedTo: notifications@ant.apache.org
        ReportedBy: jameswartell@gmail.com


re: org.apache.tools.ant.taskdefs.optional.net.TelnetTask

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
this

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

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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 49173] Telnet and Rexec tasks are broken on read

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49173

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.8.1
            Summary|Telnet task is broken on    |Telnet and Rexec tasks are
                   |read                        |broken on read

--- Comment #3 from Stefan Bodewig <bo...@apache.org> 2010-04-23 04:36:33 EDT ---
Thanks!

This is what you get when you don't have a test environment around.  Should be
fixed with svn revision 937187 - but it would be good if you could double
check.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 49173] Telnet task is broken on read

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49173

--- Comment #1 from James Wartell <ja...@gmail.com> 2010-04-22 21:34:50 EDT ---
also reported to the mailing list by someone else here:

http://mail-archives.apache.org/mod_mbox/ant-user/201004.mbox/%3Cp2qdedf1a7b1004150751k3324ecf1pff37d2ec91f9b520@mail.gmail.com%3E

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 49173] Telnet task is broken on read

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49173

--- Comment #2 from James Wartell <ja...@gmail.com> 2010-04-22 21:50:09 EDT ---
Created an attachment (id=25337)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25337)
proposed patch

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.