Name: nt126004 Date: 03/03/2003
A DESCRIPTION OF THE REQUEST :
Both of these classes require subclassing to create a new encoder or decoder, respectively. Both of these classes also maintain an internal state of RESET, CODING, CODING_END, or FLUSHED.
Subclassing either one of these classes can be difficult, however, because the internal state maintained by these classes is opaque (no getters or setters, period) to the subclass. Additionally, all external methods that change this state are declared as final, making it impossible to create a similar state in the subclass. This is especially problematic when the subclass is an aggregating encoder/decoder liek the type require to do generic ISO-2022 encoding and decoding.
To allow easier subclassing of these classes as is intended by the java.nio.charset framework.
EXPECTED VERSUS ACTUAL BEHAVIOR :
I would expect to be able to at least monitor the state via a protected or public getter. A protected setter to allow subclasses to change the state would also be expected. Leaving the current final methods final is probably acceptable.
See description above.
(Review ID: 181968)