commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [CODEC] Hex class confusing mix of static and instance methods
Date Tue, 15 Jul 2008 10:04:08 GMT
On 15/07/2008, James Ring <sjr@jdns.org> wrote:
> Hey Sebb,
>
>
>  On Mon, Jul 14, 2008 at 5:08 AM, sebb <sebbaz@gmail.com> wrote:
>  > The Hex class has a mix of static and instance methods, which is a bit
>  > confusing.
>  >
>  > The class does not have any state at all, so all the methods could be static.
>  >
>  > Perhaps we should consider adding static versions of the instance
>  > methods (and have the instance methods call these), with a view to
>  > perhaps deprecating the instance methods at some stage?
>
>
> How about just making the existing methods static? Static analysis
>  tools like findbugs will probably complain that they are using an
>  instance rather than the class name to refer to the newly-static
>  methods, but no big deal.
>

Nice idea.

Tried it, but I'd not noticed that the instance methods are actually
implementations of interfaces, so that isn't allowed.

Looks like the mixture will have to remain.
I suppose one could add static versions of the interface methods, but
not sure it is worth it.

Sorry for the noise.

>  > Views?
>
>  Regards,
>  James
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message