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.
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
Created attachment 25337 [details] proposed patch
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.