Integrated: 8256480: Refactor ObjectInputStream field reader implementation
Roger Riggs
rriggs at openjdk.java.net
Tue Nov 24 17:06:56 UTC 2020
On Wed, 18 Nov 2020 17:32:55 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> ObjectInputStream has nearly identical but separate implementations to read values from the stream.
> Both implementations read primitive and object values from the stream and return an object holding the values.
> OIS.readFields() uses the internal class GetFieldImpl while OIS.defaultReadObject and reading records uses the internal class FieldValues.
> The behavioral difference between the two is whether dependencies are tracked in the object handle table or not.
>
> The classes are merged, retaining the internal FieldValues name and the behavior to track dependencies or not.
> The constructor is passed the class descriptor and flag to track or not; it reads and saves the values from the stream.
> The callers are updated to call the merge FieldValues methods.
>
> There is no change in behavior; all current tests pass.
This pull request has now been integrated.
Changeset: bd14274b
Author: Roger Riggs <rriggs at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/bd14274b
Stats: 157 lines in 1 file changed: 28 ins; 76 del; 53 mod
8256480: Refactor ObjectInputStream field reader implementation
Reviewed-by: bchristi
-------------
PR: https://git.openjdk.java.net/jdk/pull/1296
More information about the core-libs-dev
mailing list