8253832: CharsetDecoder : decode() mentioning CoderMalfunctionError behavior not as per spec

Reviewed-by: alanb
This commit is contained in:
Naoto Sato 2020-10-06 12:35:52 +00:00
parent f397b60ae1
commit a34f48bcf5
3 changed files with 98 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -583,9 +583,7 @@ public abstract class Charset$Coder$ {
CoderResult cr;
try {
cr = $code$Loop(in, out);
} catch (BufferUnderflowException x) {
throw new CoderMalfunctionError(x);
} catch (BufferOverflowException x) {
} catch (RuntimeException x) {
throw new CoderMalfunctionError(x);
}