commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EMAIL-118) smtpPort setter and getter doesn't works with the same type in EmailClass
Date Thu, 16 Mar 2017 20:14:41 GMT

    [ https://issues.apache.org/jira/browse/EMAIL-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15928786#comment-15928786
] 

Sebb commented on EMAIL-118:
----------------------------

It would be simpler (and compatible) to add an overloaded method setPort(String) and then
deprecate setPort(int).

AIUI javamail expects String properties only.

> smtpPort setter and getter doesn't works with the same type in EmailClass
> -------------------------------------------------------------------------
>
>                 Key: EMAIL-118
>                 URL: https://issues.apache.org/jira/browse/EMAIL-118
>             Project: Commons Email
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Xavier Detant
>            Priority: Trivial
>              Labels: patch
>             Fix For: 2.0
>
>         Attachments: SmtpAsInt.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> The smtpPort in the Email class can be set as an int but is get as a String. This is
quite bad design, the getter and the setter should works with the same type. As smtp ports
is a number, the getter which is currently _public String getSmtpPort()_ should be _public
int getSmtpPort()_:



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message