RFR: JDK-8039751: UTF-8 decoder fails to handle some edge cases correctly
Alan.Bateman at oracle.com
Sat Apr 12 09:53:07 UTC 2014
On 09/04/2014 22:51, Xueming Shen wrote:
> Please help review the fix for JDK-8039751.
> Issue: https://bugs.openjdk.java.net/browse/JDK-8039751
> webrev: http://cr.openjdk.java.net/~sherman/8039751/webrev/
> This is the corner case (in 4 bytes sequence) we missed when fixing
> 7096080 .
> The UTF_8 decoder correctly returns the malformed length for some
> 4-byte illegal byte sequence (via Decoder.malformedN(...)), but it
> fails to do so if
> there is no enough (< 4 bytes) bytes in input buffer (via
This looks okay to me although I think it would be useful to put in an
addition comment or two to make these corner cases a bit easier to
understand when looking at this code.
More information about the core-libs-dev