>(the { in the while clause is on a separate line because it would break
>the 80 char limit) The limit is 100 ;) <module name="LineLength"> <property name="max" value="100"/> <property name="ignorePattern" value="^ *\* *[^ ]+$"/> </module> BTW, if I read that ignorePattern right, JavaDoc lines could be longer than 100 ... I remember of some "too long" uris in javadoc somewhere ... Jan >ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp. java (original) >> @@ -310,10 +310,21 @@ >> } >> >> private String parseUri(String uri) { >> - int indexOfAt = uri.lastIndexOf('@'); >> + >> + int indexOfAt = uri.indexOf('@'); >> int indexOfColon = uri.indexOf(':'); >> + >> if (indexOfColon > -1 && indexOfColon < indexOfAt) { >> // user:[EMAIL PROTECTED]:/path notation >> + // everything upto the last @ before the last : is considered >> + // password. (so if the path contains an @ and a : it will not work) >> + int indexOfCurrentAt = indexOfAt; >> + int indexOfLastColon = uri.lastIndexOf(':'); >> + while (indexOfCurrentAt > -1 && indexOfCurrentAt < indexOfLastColon) >> + { >> + indexOfAt = indexOfCurrentAt; >> + indexOfCurrentAt = uri.indexOf('@', indexOfCurrentAt + 1); >> + } >> setUsername(uri.substring(0, indexOfColon)); >> setPassword(uri.substring(indexOfColon + 1, indexOfAt)); >> } else { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]