commonsrdf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (COMMONSRDF-47) RDFSyntax should be interface, not enum
Date Thu, 17 Nov 2016 22:55:58 GMT


ASF GitHub Bot commented on COMMONSRDF-47:

Github user ansell commented on a diff in the pull request:
    --- Diff: simple/src/main/java/org/apache/commons/rdf/simple/experimental/
    @@ -240,7 +240,7 @@ public T rdfTermFactory(RDF rdfTermFactory) {
         public T contentType(RDFSyntax rdfSyntax) throws IllegalArgumentException {
             AbstractRDFParser<T> c = clone();
    --- End diff --
    Is it actually necessary to clone here? The typical builder pattern is much simpler with
its reliance on always having "return this" as its last line, and using mutation before the
"build()" terminal method to reduce this horrendous complexity related to cloning longterm
mutable objects.

> RDFSyntax should be interface, not enum
> ---------------------------------------
>                 Key: COMMONSRDF-47
>                 URL:
>             Project: Apache Commons RDF
>          Issue Type: Bug
>          Components: api
>    Affects Versions: 0.2.0
>            Reporter: Stian Soiland-Reyes
>            Assignee: Stian Soiland-Reyes
> [~p_ansell] raises in [pull request 25|]
> {quote}
> Using enum for RDFSyntax is a bad idea unless it overrides an interface and the interface
is used in method signatures instead of the enum. There are many other RDFSyntaxes, and enum
(without implementing an interface) is only suited to cases where the full set are known a
> {quote}

This message was sent by Atlassian JIRA

View raw message