commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMMONSRDF-49) Make AbstractRDFParser serializable
Date Thu, 02 Nov 2017 16:32:00 GMT

    [ https://issues.apache.org/jira/browse/COMMONSRDF-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236065#comment-16236065
] 

Sebb commented on COMMONSRDF-49:
--------------------------------

What is the use case for making the class serializable?

Whilst it's fairly simple to make a class serializable, in general it's very difficult to
do it properly.
And adding Serializable places restrictions on future changes to the class.

> Make AbstractRDFParser serializable
> -----------------------------------
>
>                 Key: COMMONSRDF-49
>                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-49
>             Project: Apache Commons RDF
>          Issue Type: New Feature
>          Components: simple
>    Affects Versions: 0.3.0
>            Reporter: Stian Soiland-Reyes
>            Priority: Major
>              Labels: parser
>
> Raised by [~p_ansell] in [pull request 25|(https://github.com/apache/incubator-commonsrdf/pull/25#discussion_r85436754]
> {quote}
> The use of optional here as a field type makes it impossible to serialise. Need to have
the raw values stored in fields if you want to support serialisation in the future, which
should otherwise be possible.
> {quote}
> The suggestion is to avoid {{Optional}} in the private fields of {{AbstractRDFParser}}
so it can be serialized - it can still be {{Optional}} in the accessor methods.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message