tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (TAP5-2347) Include interface constants (such as for Dispatcher) to improve code readibility
Date Wed, 27 Aug 2014 22:32:59 GMT

     [ 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)

Mime
View raw message