-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using library code in a few classes #171
Conversation
Given PR #139 in-progress, can we hold back on the JSON-LD changes for now? |
@@ -32,52 +38,35 @@ | |||
return rand(numRand, low, high, false) ; | |||
} | |||
|
|||
/** Generate a random sequence between low (inclusive) and high (exclusive) - choose whether to have duplicates or not */ | |||
/** | |||
* Generate a random sequence between low (inclusive) and high (exclusive) - with duplicates or no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Truncated javadoc -- was "or not"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
@@ -95,19 +84,13 @@ | |||
} | |||
if ( !found ) | |||
System.err.printf("Corrupted permute: [%s] [%s]\n", strings(x), strings(x2)) ; | |||
} | |||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete commented out code? (we have git!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to!
Yes, certainly I'll hold off-- I have no idea how I missed that, especially given that I just pointed out that JSON-LD PR to a colleague in a downstream project yesterday! |
@@ -23,7 +23,6 @@ | |||
import java.io.OutputStreamWriter ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has moved to riot/writer/
else | ||
JsonUtils.write(writer, obj) ; | ||
if ( isPretty() ) JsonUtils.writePrettyPrint(writer, obj) ; | ||
else JsonUtils.write(writer, obj) ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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(....) ;
)
Node pred = t.getPredicate(); | ||
return pred.equals(RDF.type.asNode()) || ctx.containsKey(pred.getLocalName()); | ||
}) | ||
.forEachRemaining(addToContext) ; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was clearer to have the if ( p.equals(RDF.type.asNode()) )
in teh Consumer because all the logic is in one place.
Now that we have #139 in, I'll add a further commit addressing your points. Thanks! |
2b9f041
to
23cac4c
Compare
Made changes in response to your review, @afs . If you have no further objections, I'll merge this. |
23cac4c
to
b6d0f61
Compare
Just a couple of orthogonal commits that use library code in
Collections
, switch to usingdefault
methods where it seems appropriate, remove assignments with no effect, that sort of thing. If no one has any objection within a couple of days, I'll merge it myself.