Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B16F8200BCE for ; Thu, 17 Nov 2016 23:56:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B019D160B0B; Thu, 17 Nov 2016 22:56:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0DD3B160B0F for ; Thu, 17 Nov 2016 23:56:04 +0100 (CET) Received: (qmail 9837 invoked by uid 500); 17 Nov 2016 22:56:04 -0000 Mailing-List: contact dev-help@commonsrdf.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commonsrdf.incubator.apache.org Delivered-To: mailing list dev@commonsrdf.incubator.apache.org Received: (qmail 9762 invoked by uid 99); 17 Nov 2016 22:56:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 22:56:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B2B49C0FD4 for ; Thu, 17 Nov 2016 22:56:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -7.018 X-Spam-Level: X-Spam-Status: No, score=-7.018 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id JqcKq-D5v74L for ; Thu, 17 Nov 2016 22:56:03 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id BDFA25FC19 for ; Thu, 17 Nov 2016 22:55:59 +0000 (UTC) Received: (qmail 8239 invoked by uid 99); 17 Nov 2016 22:55:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 22:55:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C1C422C4C78 for ; Thu, 17 Nov 2016 22:55:58 +0000 (UTC) Date: Thu, 17 Nov 2016 22:55:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@commonsrdf.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COMMONSRDF-47) RDFSyntax should be interface, not enum MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 17 Nov 2016 22:56:05 -0000 [ https://issues.apache.org/jira/browse/COMMONSRDF-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15675058#comment-15675058 ] ASF GitHub Bot commented on COMMONSRDF-47: ------------------------------------------ Github user ansell commented on a diff in the pull request: https://github.com/apache/incubator-commonsrdf/pull/27#discussion_r88565106 --- 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 c = clone(); c.contentTypeSyntax = Optional.ofNullable(rdfSyntax); - c.contentType = c.contentTypeSyntax.map(syntax -> syntax.mediaType); + c.contentType = c.contentTypeSyntax.map(syntax -> syntax.mediaType()); return c.asT(); --- End diff -- It hurts my head thinking about this, but what is the signature for the generic type "T" designed to do. It seems like a circular definition, which doesn't really make sense but I can't think why T could have been introduced so I am stuck at seeing it as circular. ``` AbstractRDFParser> ``` > RDFSyntax should be interface, not enum > --------------------------------------- > > Key: COMMONSRDF-47 > URL: https://issues.apache.org/jira/browse/COMMONSRDF-47 > 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|https://github.com/apache/incubator-commonsrdf/pull/25#discussion_r85231845] > {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 priori. > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)