-
Notifications
You must be signed in to change notification settings - Fork 504
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
Fix weighted shortest path NPE #1250
Conversation
Change-Id: Ic0fba1a0dea58b322cf864ac7212e0d311199b6f
Change-Id: I1675790480f5499c076bfea5a0d562261eaa5b68
@@ -94,7 +94,7 @@ public String get(@Context GraphManager manager, | |||
sourceId, targetId, dir, edgeLabel, weight, | |||
degree, skipDegree, capacity); | |||
Iterator<Vertex> iterator = QueryResults.emptyIterator(); | |||
if (withVertex) { | |||
if (path != null && withVertex) { |
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.
assert path is not empty
@@ -278,7 +278,9 @@ public String writeSimilars(SimilarsMap similars, | |||
@Override | |||
public String writeWeightedPath(NodeWithWeight path, | |||
Iterator<Vertex> vertices) { | |||
return JsonUtil.toJson(ImmutableMap.of("path", path.toMap(), | |||
Map<String, Object> pathMap = path == null? |
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.
add space
Change-Id: Ic126213dde571e51f716aa0d2cb5b52d260d7c9d
Codecov Report
@@ Coverage Diff @@
## master #1250 +/- ##
============================================
+ Coverage 61.67% 62.40% +0.73%
- Complexity 5713 5758 +45
============================================
Files 374 374
Lines 31285 31291 +6
Branches 4393 4395 +2
============================================
+ Hits 19295 19528 +233
+ Misses 10008 9779 -229
- Partials 1982 1984 +2
Continue to review full report at Codecov.
|
Change-Id: I51674d1d2a41f07f6cba025f12f32b0f611fd413
* fix NPE of weighted shortest path if no results * add check for skip degree > 80w * add NO_LIMIT check in adjacentEdges() * fix template path error Change-Id: Ic0fba1a0dea58b322cf864ac7212e0d311199b6f
No description provided.