commonsrdf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ansell <...@git.apache.org>
Subject [GitHub] incubator-commonsrdf pull request #27: COMMONSRDF-47 RDFSyntax as an interfa...
Date Thu, 17 Nov 2016 22:55:02 GMT
Github user ansell commented on a diff in the pull request:

    https://github.com/apache/incubator-commonsrdf/pull/27#discussion_r88565369
  
    --- Diff: simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java
---
    @@ -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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message