You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/02 15:44:00 UTC

[jira] [Commented] (COMMONSRDF-49) Make AbstractRDFParser serializable

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

ASF GitHub Bot commented on COMMONSRDF-49:
------------------------------------------

GitHub user ajs6f opened a pull request:

    https://github.com/apache/commons-rdf/pull/43

    COMMONSRDF-49: Make AbstractRDFParser serializable

    Very simple approach-- I just exposed the values of the fields internally and made the accessors keep producing `Optional<X>`.  My understanding is that any modern JVM will hotspot all the `isPresent` and similar calls into `null` checks anyway, so there should be no performance implications.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ajs6f/commons-rdf COMMONSRDF-49

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-rdf/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #43
    
----

----


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