|
Ok,
Here's a new version of the patch I just sent,
which should be a bit cleaner. The diff is now just to patch MailAddress. The
original change is still there, but now it's changed the getHost() method to
return the ip address without the [] chars, in the case of a dotNum host. It
seemed like this was better, since it should avoid having to patch any other
classes. I don't think there are any other classes where the MailAddress is
being deconstructed and reconstructed. That's the only thing this would affect,
since the new email address string would lack the braces.
Matt Pangaro
p.s. Sorry for the extraneous traffic.
p.p.s. the "objectionable" content in the diff and
the original message have been cleansed to protect the innocent and the pure of
heart... ;-)
|
Index: MailAddress.java
===================================================================
RCS file: /home/cvspublic/jakarta-james/src/java/org/apache/mailet/MailAddress.java,v
retrieving revision 1.2
diff -r1.2 MailAddress.java
156,157c156,157
< * of this email address.
< * @throws AddressException if the parse failed
---
> * of this email address. If the host is of the dotNum form
> * (e.g. [yyy.yyy.yyy.yyy]) then strip the braces first.
160c160,164
< return host;
---
> if (!(host.startsWith("[") && host.endsWith("]"))) {
> return host;
> } else {
> return host.substring(1, host.length() -1);
> }
327a332,336
> //we were passed the string with pos pointing the the [ char.
> // take the first char ([), put it in the result buffer and increment pos
> resultSB.append(address.charAt(pos));
> pos++;
>--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
