Any opinion of an ioe based specific InvalidedBase64BytesException
is more appropriate/preferred/desired in this kinda of situation? The
argument against the IAE is probably that an IAE may be a surprise
for someone working on inputstream.read().

-Sherman

On 01/31/2013 02:55 PM, Xueming Shen wrote:

Because the error is not really triggered by an io operation when
reading from the underlying input stream. Ideally it should be a
more specific "InvalidedBase64EncodingException" exception in
 this kinda of situation (like we we do for the decoder/encoder in
charset), but it is considered too heavy in Base64 class. Maybe
the word "obviously" in my email is not appropriate, it may be
more appropriate worded as "IAE is more appropriate than
IOE for ...".

-Sherman



On 01/31/2013 02:46 PM, Louis Wasserman wrote:
In what way is this "obviously" inappropriate?  (I don't object, I just don't 
follow.)


On Thu, Jan 31, 2013 at 2:31 PM, Lance Andersen - Oracle <lance.ander...@oracle.com 
<mailto:lance.ander...@oracle.com>> wrote:

    +1
    On Jan 31, 2013, at 5:15 PM, Xueming Shen wrote:

> Hi,
>
> Obviously ioe is not an appropriate exception for invalid base64 bytes,
> and it's inconsistent with the rest of decode methods, as the submitter
> suggested.
> The change is to explicitly specify (as other decoding methods do) that
> IAE will be thrown if the input stream contains invalid base64 bytes. The
> impl is also updated according.
>
> Please help review.
>
> http://cr.openjdk.java.net/~sherman/8006295/webrev/ 
<http://cr.openjdk.java.net/%7Esherman/8006295/webrev/>
>
> Thanks
> -Sherman



    Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 
<tel:%2B1.781.442.2037>
    Oracle Java Engineering
    1 Network Drive
    Burlington, MA 01803
    lance.ander...@oracle.com <mailto:lance.ander...@oracle.com>





--
Louis Wasserman


Reply via email to