You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2016/08/22 22:11:20 UTC
[jira] [Resolved] (RNG-10) "save" and "restore" using explicit byte
array
[ https://issues.apache.org/jira/browse/RNG-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gilles resolved RNG-10.
-----------------------
Resolution: Fixed
Merged into "master".
> "save" and "restore" using explicit byte array
> ----------------------------------------------
>
> Key: RNG-10
> URL: https://issues.apache.org/jira/browse/RNG-10
> 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
(v6.3.4#6332)