tinkerpop
tinkerpop copied to clipboard
fixed null exception
Fixed "Caused by: java.lang.NullPonterException" Signed-off-by: nikita15p [email protected]
Codecov Report
Merging #1732 (10b463d) into master (5438925) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #1732 +/- ##
=======================================
Coverage 63.84% 63.84%
=======================================
Files 23 23
Lines 3596 3596
=======================================
Hits 2296 2296
Misses 1137 1137
Partials 163 163
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5438925...10b463d. Read the comment docs.
Thank you for the code change @nikita15p. Could we add a unit test here which fails prior to this change and passes after? It would help us catch any regression in future.
@divijvaidya
Same condition currentPath != null
is already available at line 408, since we are accessing objects() method.
Is there any test case for that? Basically this is the obvious fix which I am recommending since I came across exception.
i think the check at 408 is part of the design for extendPath()
where null
is expected. i think @divijvaidya is questioning the circumstances around the currentPath
being null
in processEdges()
where it doesn't seem clear how currentPath
would end up that way. understanding "how" would better explain what is happening there and if simply ignoring the subsequent code path is the right fix.
@nikita15p bump - are you able to make a unit test for this situation? Would be good to know how this is happening.
I faced this problem in my code and have fixed it locally. Will write a UT and update the PR. Couldn't work on this till now.
Thanks and Regards, Nikita
On Thu, 18 Aug, 2022, 3:47 am Lyndon Bauto, @.***> wrote:
@nikita15p https://github.com/nikita15p bump - are you able to make a unit test for this situation? Would be good to know how this is happening.
— Reply to this email directly, view it on GitHub https://github.com/apache/tinkerpop/pull/1732#issuecomment-1218546764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI7JTNHQWHAETV6OOAPT7R3VZVQGZANCNFSM5ZPZJ4SQ . You are receiving this because you were mentioned.Message ID: @.***>
Thank you for raising the PR. We've decided to close this one as there has not been any activity in the past 3 months.
Please feel free to open another PR to fix this if you are still interested, providing an explanation on how the current path leads to the exception and adding a unit test.