Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/171#discussion_r82183935
--- Diff: jena-arq/src/main/java/org/apache/jena/riot/out/JsonLDWriter.java
---
@@ -98,10 +96,8 @@ private void serialize(Writer writer, DatasetGraph
dataset, PrefixMap prefixMap,
// Unclear as to the way to set better printing.
obj = JsonLdProcessor.compact(obj, localCtx, opts) ;
- if ( isPretty() )
- JsonUtils.writePrettyPrint(writer, obj) ;
- else
- JsonUtils.write(writer, obj) ;
+ if ( isPretty() ) JsonUtils.writePrettyPrint(writer, obj) ;
+ else JsonUtils.write(writer, obj) ;
--- End diff --
I don't like if statements with their positive clause on the same line
unless they have no else clause and are not part of the flow of the logic.
(e.g. not part of the flow: `if ( DEBUG) System.err.println(....) ;`)
---
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 [email protected] or file a JIRA ticket
with INFRA.
---