Skip to content
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

Cleanup #407

Merged
merged 6 commits into from
Apr 25, 2018
Merged

Cleanup #407

merged 6 commits into from
Apr 25, 2018

Conversation

afs
Copy link
Member

@afs afs commented Apr 24, 2018

A number of small things noticed while investigating a TDB2 report.

Includes tweak for JENA-1428 (cleanup) and fix for JENA-1531.

@@ -111,7 +112,8 @@ public Graph getDefaultGraph() {

@Override
public Graph getGraph(Node gn) {
return ngCache.getOrFill(gn, ()->GraphViewSwitchable.createNamedGraph(this, gn));
Node key = ( gn != null ) ? gn : Quad.defaultGraphNodeGenerated;
return ngCache.getOrFill(gn, ()->GraphViewSwitchable.createNamedGraph(this, key));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the first gn reference on this line also be changed to key otherwise you are adding a potentially null key to the cache

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, doh! Thanks for spotting that.

@asfgit asfgit merged commit 5ea93ce into apache:master Apr 25, 2018
asfgit pushed a commit that referenced this pull request Apr 25, 2018
@afs afs deleted the cleanup branch April 25, 2018 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants