RFR 8014217: Base64.getXDecoder().wrap(...).read() doesn't throw exception for an incorrect number of padding chars in the final unit

Xueming Shen xueming.shen at oracle.com
Tue May 14 18:50:17 UTC 2013


Please help review the change for handling a "malformed base64 stream" corner case.
The latest spec has been updated/clarified as

"If there is padding character present in the final unit, the correct number of padding
character(s) must be present, otherwise IllegalArgumentException is thrown during

But the stream decoding implementation has not been updated accordingly. The change
is to throw the IOE if the padding character "=" is missing from the xx== pattern.



More information about the core-libs-dev mailing list