commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (RNG-10) "save" and "restore" using explicit byte array
Date Fri, 19 Aug 2016 22:32:20 GMT


Gilles commented on RNG-10:

Branch "RNG-10__no_serializable" contains the proposed changes.

> "save" and "restore" using explicit byte array
> ----------------------------------------------
>                 Key: RNG-10
>                 URL:
>             Project: Commons RNG
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>              Labels: api
>             Fix For: 1.0
> I think that the current implementation of "save" and "restore" (of the internal state
of a RNG) does not gain anything from attempting to hide (using a marker interface) that the
state is represented by a {{byte[]}} primitive array.
> Moreover, hiding the concrete class (that implements the marker interface and {{Serializable}})
in the {{BaseProvider}} internal class is also needlessly complicated with no clear benefit.
> I propose to replace the marker interface with a concrete class that wraps a {{byte[]}}
field with a public accessor method.
> As before, library users do not need to know how the actual state of a RNG is represented
by this field, but can directly serialize the {{byte[]}} field returned by the getter.

This message was sent by Atlassian JIRA

View raw message