You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2014/08/28 00:32:59 UTC
[jira] [Closed] (TAP5-2347) Include interface constants (such as
for Dispatcher) to improve code readibility
[ https://issues.apache.org/jira/browse/TAP5-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-2347.
--------------------------------------
Resolution: Won't Fix
You can define such constants yourself. We should have implemented an enum for this purpose, but that horse has left the barn.
> Include interface constants (such as for Dispatcher) to improve code readibility
> --------------------------------------------------------------------------------
>
> Key: TAP5-2347
> URL: https://issues.apache.org/jira/browse/TAP5-2347
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Reporter: Robert Hailey
> Priority: Trivial
>
> Basically, I would change this:
> public interface Dispatcher
> {
> boolean dispatch(Request request, Response response) throws IOException;
> }
> To this:
> public interface Dispatcher
> {
> boolean dispatch(Request request, Response response) throws IOException;
> public static final boolean HANDLED =true;
> public static final boolean CONTINUE=false;
> }
> Which would let someone write "return HANDLED;" because the constants come with the interface.
> There may be other, similar, interfaces to consider such a touch up.
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Suggestion-Dispatcher-interface-should-have-return-values-as-public-constants-td5727094.html
--
This message was sent by Atlassian JIRA
(v6.2#6252)