You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tiles.apache.org by Antonio Petrelli <an...@gmail.com> on 2007/04/12 13:04:46 UTC
Constants interface
Hi all!
When generating the Checkstyle report I noticed that it does not like
the "Constants" interface, because it contains only constant fields
(and no methods).
So I was trying to remove it at all, since it contains only two constants:
ATTRIBUTE_CONTEXT_STACK is used only in BasicAttributeContext, it
should be a private member of it (it's easy to refactor);
LOCALE_KEY seems to be a part of DefaultLocaleServlet, but it is used
in several points of test classes and the test webapp, so probably the
best solution is to deprecate it and move it inside
DefaultLocaleServlet (as a public member), until a new *common* Locale
resolution strategy comes up.
I think that these changes should be done inside the 2.0.x development
line, before it is too late, but probably this way it causes the 2.0.3
release to be an alpha.
Thoughts?
Antonio
Re: Constants interface
Posted by "David H. DeWolf" <dd...@apache.org>.
oh, sorry, I wasn't paying attention that well :)
Antonio Petrelli wrote:
> 2007/4/12, David H. DeWolf <dd...@apache.org>:
>> In the future, since we're on java5, these types of constants should
>> probably by enums anyways.
>
> enums? They are used as attribute names in request and session scope!
>
> Antonio
>
Re: Constants interface
Posted by Antonio Petrelli <an...@gmail.com>.
2007/4/12, David H. DeWolf <dd...@apache.org>:
> In the future, since we're on java5, these types of constants should
> probably by enums anyways.
enums? They are used as attribute names in request and session scope!
Antonio
Re: Constants interface
Posted by "David H. DeWolf" <dd...@apache.org>.
Agreed. I'm all for it.
In the future, since we're on java5, these types of constants should
probably by enums anyways.
Antonio Petrelli wrote:
> Hi all!
> When generating the Checkstyle report I noticed that it does not like
> the "Constants" interface, because it contains only constant fields
> (and no methods).
> So I was trying to remove it at all, since it contains only two constants:
> ATTRIBUTE_CONTEXT_STACK is used only in BasicAttributeContext, it
> should be a private member of it (it's easy to refactor);
> LOCALE_KEY seems to be a part of DefaultLocaleServlet, but it is used
> in several points of test classes and the test webapp, so probably the
> best solution is to deprecate it and move it inside
> DefaultLocaleServlet (as a public member), until a new *common* Locale
> resolution strategy comes up.
> I think that these changes should be done inside the 2.0.x development
> line, before it is too late, but probably this way it causes the 2.0.3
> release to be an alpha.
>
> Thoughts?
> Antonio
>