james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-2382) Inconsistent method name
Date Sat, 21 Apr 2018 22:11:00 GMT

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

ASF GitHub Bot commented on JAMES-2382:
---------------------------------------

GitHub user BruceKuiLiu opened a pull request:

    https://github.com/apache/james-project/pull/110

    JAMES-2382: Change the method name "hasAnnotatedProperty".

    The method is named "hasAnnotatedProperty" that is a query of asking whether the propertyDescriptor
has the AnnotatedProperty or not.
    Actually, the method returns an AnnotatedProperty found by the propertyDescriptor.
    Thus, the method name "findAnnotatedProperty" should be intuitive than "hasAnnotatedProperty".

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceKuiLiu/james-project master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/james-project/pull/110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #110
    
----
commit 9de0b5f466b62f2231f2b9e075360e145e088957
Author: Kui LIU <brucekuiliu@...>
Date:   2018-04-21T21:58:50Z

    Change the method name.

----


> Inconsistent method name
> ------------------------
>
>                 Key: JAMES-2382
>                 URL: https://issues.apache.org/jira/browse/JAMES-2382
>             Project: James Server
>          Issue Type: Improvement
>            Reporter: KuiLIU
>            Priority: Major
>
> The following method is named "hasAnnotatedProperty" that is a query of asking whether
the propertyDescriptor has the AnnotatedProperty or not.
> Actually, the method returns an AnnotatedProperty found by the propertyDescriptor.
> Thus, the method name "findAnnotatedProperty" should be intuitive than "hasAnnotatedProperty".
> {code:java}
>     private A hasAnnotatedProperty(PropertyDescriptor propertyDescriptor) {
>         Method setter = propertyDescriptor.getWriteMethod();
>         return setter != null ? AnnotationUtils.getAnnotation(setter, getAnnotation())
: null;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message