[Mono-devel-list] System.Web/System.Web.Mail - patch (code synchronization between Mono and Mainsoft)

Ilya Kharmatsky ilyak at mainsoft.com
Thu Jun 9 17:31:07 EDT 2005


In this case there is no "appropriate" throw. May be I'm wrong, but
in .Net code there is no exception in this method.

Konstantin Triger wrote:

> Hi Ilya,
>
> It's worth to wrap the
>
> "java.net.InetAddress address = java.net.InetAddress.getLocalHost();"
>
> with an appropriate try/catch/throw, otherwise a Java exception would 
> be thrown to the user.
>
> Regards,
> Konstantin Triger
>
>
>
> Ilya Kharmatsky wrote:
>
>> Please review the patch.
>>
>> Thanks,
>> Ilya.
>>
>> ------------------------------------------------------------------------
>>
>> Index: ChangeLog
>> ===================================================================
>> --- ChangeLog    (revision 45568)
>> +++ ChangeLog    (working copy)
>> @@ -1,3 +1,9 @@
>> +2005-06-08 Ilya Kharmatsky <ilyak-at-mainsoft.com>
>> +
>> +    * SmtpMail.cs: Added TARGET_JVM directive in Send method,
>> +    where we will use in J2EE configuration the "native" java
>> +    support for obtaining the network address of localhost.
>> +    2005-04-20 Gonzalo Paniagua Javier <gonzalo at ximian.com>
>>
>>     * SmtpClient.cs:
>> Index: SmtpMail.cs
>> ===================================================================
>> --- SmtpMail.cs    (revision 45614)
>> +++ SmtpMail.cs    (working copy)
>> @@ -64,7 +64,17 @@
>>             // access to properties and to add some functionality
>>             MailMessageWrapper messageWrapper = new 
>> MailMessageWrapper( message );
>>            
>> +#if TARGET_JVM
>> +            string currentSmtpServer = smtpServer;
>> +            if (currentSmtpServer == "localhost")
>> +            {
>> +                java.net.InetAddress address = 
>> java.net.InetAddress.getLocalHost();
>> +                currentSmtpServer = address.getHostAddress();
>> +            }
>> +            SmtpClient smtp = new SmtpClient (currentSmtpServer);
>> +#else
>>             SmtpClient smtp = new SmtpClient (smtpServer);
>> +#endif
>>            
>>             smtp.Send (messageWrapper);
>>                 
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>  
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050610/12a566e5/attachment.html 


More information about the Mono-devel-list mailing list