[ https://issues.apache.org/jira/browse/JENA-1454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16388622#comment-16388622 ]
ASF GitHub Bot commented on JENA-1454: -------------------------------------- Github user afs commented on a diff in the pull request: https://github.com/apache/jena/pull/373#discussion_r172680400 --- Diff: jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java --- @@ -131,26 +130,30 @@ public static void doResponseResultSet(HttpAction action, ResultSet resultSet, P contentType = contentTypeTextPlain ; // Some kind of general dispatch is neater but there are quite a few special cases. + // text/plain is special because there is no ResultSetWriter for it (yet). + // Text plain is special because of the formatting by prologue. + // text/plain is not a registered result set language. // // JSON is special because of ?callback - // + // // XML is special because of // (1) charset is a feature of XML, not the response // (2) ?stylesheet= // // Thrift is special because // (1) charset is meaningless // (2) there is no boolean result form. - // - // Text plain is special because of the formatting by prologue. - + + if ( Objects.equals(serializationType, contentTypeTextPlain) ) { --- End diff -- Style, no more : `Objects.equals` copes with null in the same way the back-to-front `constant.equals(variable)` is also a null-defending idiom. Not that there will be nulls. It could be a switch on strings. It should be `lang` driven but there is no text result set writer ATM and text is odd because it uses prefixes and no other result set format does. This is a quick fix to restore what become broken in the JENA-1454 redesign. > Configurable ResultSet reading and writing > ------------------------------------------ > > Key: JENA-1454 > URL: https://issues.apache.org/jira/browse/JENA-1454 > Project: Apache Jena > Issue Type: Improvement > Reporter: Andy Seaborne > Assignee: Andy Seaborne > Priority: Minor > Fix For: Jena 3.7.0 > > > Same patterns as {{RDFParser}}, {{RDFWriter}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)