-
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
Cleanup #407
Cleanup #407
Conversation
@@ -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)); |
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.
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
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.
Yes, doh! Thanks for spotting that.
A number of small things noticed while investigating a TDB2 report.
Includes tweak for JENA-1428 (cleanup) and fix for JENA-1531.