On 14/07/2008, Jochen Wiedmann <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 14, 2008 at 3:37 PM, sebb <[EMAIL PROTECTED]> wrote:
>
>  > Should have tried it before posting ...
>  >
>  > Both IOException and DecoderException are checked, and so this means
>  > that the method signature for
>  >
>  > public static byte[] decodeBase64()
>  >
>  > would need to change - or the method needs to convert the
>  > DecoderException to an unchecked error.
>  >
>  > Thoughts?
>
>
> In such cases I'd recommend to catch the Exception and convert it into
>  an UndeclaredThrowableException. However, I'd also deprecate the
>  method and add a successor. I'd discourage things like adding a
>  boolean flag that suppresses the exception.
>
>

Just noticed https://issues.apache.org/jira/browse/CODEC-68 which
implies that at least one person is expecting to be able to include
invalid base64 characters without a problem - in that case, after the
PAD characters.

So maybe there is a need to preserve compatibility after all.

Perhaps one way round this would be to add method(s) that enforce validation?

>
>  Jochen
>
>
>
>  --
>  Look, that's why there's rules, understand? So that you think before
>  you break 'em.
>
>   -- (Terry Pratchett, Thief of Time)
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to