commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (RNG-10) "save" and "restore" using explicit byte array
Date Mon, 22 Aug 2016 22:11:20 GMT

     [ 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)

Mime
View raw message