Skip to content

Commit e3855d0

Browse files
committed
8304840: Dangling CharacterCodingException in a few javadoc descriptions
Reviewed-by: alanb, iris, rriggs, jpai
1 parent 6727490 commit e3855d0

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template

+9
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,15 @@ public abstract class Charset$Coder$ {
793793
* the current unmappable-character action is {@link
794794
* CodingErrorAction#REPORT}
795795
*
796+
* @throws CharacterCodingException
797+
* {@code MalformedInputException} if the $itype$ sequence starting at the
798+
* input buffer's current position is $notLegal$ and the current
799+
* malformed-input action is {@code CodingErrorAction.REPORT};
800+
* {@code UnmappableCharacterException} if the $itype$ sequence starting at
801+
* the input buffer's current position cannot be mapped to an
802+
* equivalent $otype$ sequence and the current unmappable-character
803+
* action is {@code CodingErrorAction.REPORT}
804+
*
796805
* @throws OutOfMemoryError
797806
* If the output $otype$ buffer for the requested size of the input
798807
* $itype$ buffer cannot be allocated

src/java.base/share/classes/java/nio/charset/CoderResult.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -264,6 +264,11 @@ public static CoderResult unmappableForLength(int length) {
264264
* @throws UnmappableCharacterException
265265
* If this object represents an unmappable-character error; the
266266
* exception's length value will be that of this object
267+
*
268+
* @throws CharacterCodingException
269+
* {@code MalformedInputException} if this object represents a
270+
* malformed-input error; {@code UnmappableCharacterException}
271+
* if this object represents an unmappable-character error
267272
*/
268273
public void throwException()
269274
throws CharacterCodingException

0 commit comments

Comments
 (0)