JDK-6228568 : (cs) Charset.forName() throws inaccurate/inappropriate exception when null is the charset name
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-02-12
  • Updated: 2017-05-16
  • Resolved: 2005-09-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b51Fixed
Related Reports
Relates :  
Relates :  
Description
(cs) Charset.forName() current throws IllegalArgumentException (which is not documented) when null is the charset name passed in, a NullPointerException is
more appropriate (by convention) in this situation.
###@###.### 2005-2-12 00:35:14 GMT

Comments
EVALUATION The fix is to document the current behavior. for mustang ###@###.### 2005-2-12 00:35:14 GMT There is the same problem with Charset.isSupported(). See motivation in the comments section. ###@###.### 2005-2-12 12:32:35 GMT
12-02-2005