JDK-8163517 : Various cleanup in java.io code
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io:serialization
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-08-09
  • Updated: 2016-08-25
  • Resolved: 2016-08-18
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 9
9 b133Fixed
Related Reports
Relates :  
Description
A cleanup pass over code under src/java.base/share/classes/java/io:

- special handling of a null arg can be replaced with using String.valueOf()
- in ObjectInput[Output]Stream checking/putting into map can be replaced with a single call to computeIfAbsent();
- in ObjectStreamClass.getPackageName() one call to String.substing() can be avoided;

and a few other cleanups.

Comments
Thanks Alan for clarification. I'll push the fix then once the final round of testing is finished.
17-08-2016

Clean-up changes don't need a FC extension request. Aside from code review, there doesn't seem to be anything here that needs special approvals.
17-08-2016

FC Extension Request This is a cleanup change, which doesn't change the behavior of the modified classes. The goal is to make the code shorter, cleaner and sometimes a bit faster. The risk level is low, as the changes are either trivial or obvious. The latest webrev: http://cr.openjdk.java.net/~igerasim/8163517/01/webrev/ Review: http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-August/042943.html
17-08-2016