dev@fi.java.net

Re: AttributesHolder

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 20 Oct 2006 15:42:08 +0200

Alan Hudson wrote:
> in getValue there was a check for the registeredEncodingAlgorithms table
> being null. In this case I hadn't registered anything, ie I just used
> the builtins. I checked in this fix.
>
> if (_algorithmData[index] == null ||
> (_registeredEncodingAlgorithms == null &&
> _algorithmIds[index] >=
> EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END)) {
>
> return null;
> }
>
>

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?

Paul.

> You may want to require the builtins to be registered, not sure. If so
> my change should be backed out and I'll change my user code. But
> registered the builtins would be kinda annoying.
>
>
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109