dev@fi.java.net

Re: AttributesHolder

From: Alan Hudson <giles_at_yumetech.com>
Date: Fri, 20 Oct 2006 06:51:25 -0700

Paul Sandoz wrote:
> Alan Hudson wrote:
>
>
> Hmm... IMHO if the attribute cannot be converted to a string because
> some algorithm has not been registered then that should, by default,
> result in an exception being thrown.
>
> I think the correct fix here is to have an configuration option to
> silently ignore data that cannot be processed. What do you think?
>

What level do you consider the builtin encoders. In this case I was
assuming the system understood them at a pretty low level. Hence what a
  getValue() would give me the value. But it does encourage non optimal
behavior because the "right" way to process that is getting the
primitive array back instead of converting to a string.

But I expect users will call that method and expect it to just work.
The code I put in does that.

Throwing an exception would be better then the null value as it will
direct better programmer behavior.

Aren't builtins always registered? Ie I don't remember registering
them, but perhaps I was susposed to. If they are already builtin in one
place, then I'd be suprised to have to register them to the holder class.
-- 
Alan Hudson
President Yumetech, Inc.                               www.yumetech.com
President Web3D Consortium                             www.web3d.org
206 340 8900