+1 I think we can refine it further:

- If constants are used only by one class, define them in the class itself.
- If constants are used by multiple classes within the same java package,
have a constants class in the above package to add them.
- If constatns are used by multiple classes in different packages of the
same module, have a constants class in the module to add them.
- If constants are used by multiple classes in different modules, add them
to the constants class in the commons module.

Thanks

On Wed, Nov 26, 2014 at 12:24 PM, Gayan Gunarathne <[email protected]> wrote:

> Hi All,
>
> We have found in the Stratos messaging component "Constants.java" file
> needs to be re-factor as there are some inappropriate constant values.
>
> Shall we used the following policy when we define the constants.
>
> If the constant only use in that module , we can declare the constant
> within the module.
> If we found any constant share among the modules shall we declare that
> constant in the
> common module.
>
> WDYT?
>
> Thanks,
> Gayan
>
>
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to