[ 
https://issues.apache.org/jira/browse/AMQ-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Liguori updated AMQ-3203:
--------------------------------

    Description: 
Consider the following three statements in the MessagePriorityTest test class;

    public int MSG_NUM = 600;
    public int HIGH_PRI = 7;
    public int LOW_PRI = 3;

Each identifier is "named" as a constant, though they are not marked as final.

Quick simple reference: 
http://java.about.com/od/javasyntax/a/nameconventions.htm.

I opened this issue as I was surprised it wasn't caught by the quality tools. 

Does ActiveMQ have Checkstyle in place... I believe that CXF does, and its 
Maven/Checkstyle integration model could be followed here, if need be.

This issue requests that all identifiers named as constants in the ActiveMQ 
distribution use constant-related modifiers (i.e. final and static), making 
them actual constants.

Preferred use case:

    private static final int MSG_NUM = 600;
    private static final int HIGH_PRI = 7;
    private static final int LOW_PRI = 3;

Btw, Sonar isn't picking the naming-convention/statement mixmatch... so maybe 
Checkstyle isn't setup/enabled here either: 
http://nemo.sonarsource.org/drilldown/measures/78577?metric=classes&rids[]=78694&rids[]=78727#

Thanks.

  was:
Consider the following three statements int the MessagePriorityTest test class;

    public int MSG_NUM = 600;
    public int HIGH_PRI = 7;
    public int LOW_PRI = 3;

Each identifier is "named" as a constant, though they are not marked as final 
(or static).

Quick simple reference: 
http://java.about.com/od/javasyntax/a/nameconventions.htm.

I opened this issue as I was surprised it wasn't caught by the quality tools. 

Does ActiveMQ have Checkstyle in place... I believe that CXF does, and its 
Maven/Checkstyle integration model could be followed here, if need be.

This issue requests that all identifiers named as constants in the ActiveMQ 
distribution use constant-related modifiers (i.e. final and static), making 
them actual constants.

Btw, Sonar isn't picking it up... so maybe checkstyle isn't enabled in there 
either: 
http://nemo.sonarsource.org/drilldown/measures/78577?metric=classes&rids[]=78694&rids[]=78727#

Thanks.


> Some constants in test class are not marked as final
> ----------------------------------------------------
>
>                 Key: AMQ-3203
>                 URL: https://issues.apache.org/jira/browse/AMQ-3203
>             Project: ActiveMQ
>          Issue Type: Improvement
>            Reporter: Robert Liguori
>            Priority: Trivial
>
> Consider the following three statements in the MessagePriorityTest test class;
>     public int MSG_NUM = 600;
>     public int HIGH_PRI = 7;
>     public int LOW_PRI = 3;
> Each identifier is "named" as a constant, though they are not marked as final.
> Quick simple reference: 
> http://java.about.com/od/javasyntax/a/nameconventions.htm.
> I opened this issue as I was surprised it wasn't caught by the quality tools. 
> Does ActiveMQ have Checkstyle in place... I believe that CXF does, and its 
> Maven/Checkstyle integration model could be followed here, if need be.
> This issue requests that all identifiers named as constants in the ActiveMQ 
> distribution use constant-related modifiers (i.e. final and static), making 
> them actual constants.
> Preferred use case:
>     private static final int MSG_NUM = 600;
>     private static final int HIGH_PRI = 7;
>     private static final int LOW_PRI = 3;
> Btw, Sonar isn't picking the naming-convention/statement mixmatch... so maybe 
> Checkstyle isn't setup/enabled here either: 
> http://nemo.sonarsource.org/drilldown/measures/78577?metric=classes&rids[]=78694&rids[]=78727#
> Thanks.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to