Community
Participate
Working Groups
Retrieving Reviews in a specific case causes a NPE against Gerrit 2.9. As stated in https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#submit-record , the field "need" contains a Map of labels that need to be given to submit. The value is currently an empty object. This case is treated by the code as if it contains a Map of Labels with AccountInfos (GerritClient line 554 - 564) and causes a NPE. Stacktrace (Line numbers may be slightly different a I use a local build with changes that are not yet submitted) java.lang.NullPointerException at org.eclipse.mylyn.internal.gerrit.core.client.compat.SubmitRecord.createLabel(SubmitRecord.java:105) at org.eclipse.mylyn.internal.gerrit.core.client.GerritClient.currentSubmitRecord29(GerritClient.java:559) at org.eclipse.mylyn.internal.gerrit.core.client.GerritClient.getChangeDetail29(GerritClient.java:503) at org.eclipse.mylyn.internal.gerrit.core.client.GerritClient.getChangeDetail(GerritClient.java:610) at org.eclipse.mylyn.internal.gerrit.core.client.GerritClient.getChange(GerritClient.java:966) at org.eclipse.mylyn.internal.gerrit.core.remote.GerritReviewRemoteFactory.pull(GerritReviewRemoteFactory.java:91) at org.eclipse.mylyn.internal.gerrit.core.remote.GerritReviewRemoteFactory.pull(GerritReviewRemoteFactory.java:1) at org.eclipse.mylyn.reviews.core.spi.remote.emf.RemoteEmfConsumer.pull(RemoteEmfConsumer.java:128) at org.eclipse.mylyn.reviews.core.spi.remote.JobRemoteService$1.run(JobRemoteService.java:61) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
While trying to fix this I ran into another NPE that might be another case. I don't have time to look further into this today. Writing a test case against the vm that reproduces this NPE would need a -2 against the remote Gerrit, that is currently not possible but will be after https://git.eclipse.org/r/#/c/36306/ or something similar is submitted and the vm is rebuilt with the changed settings.
Ron, are you planning to work on this? If so I'll assign to you.
I'd like to sort out issues with my other change first, so this might take some days. If there is no one else in between I can do this. We use 2.9.1 daily, have 2000+ Reviews done since we set it up and will run into some more issues for sure ;)
Ok, great. Out of curiosity, do you have any idea how many users you have using the Gerrit connector?
Currently we have 6 - 10 users on our Gerrit server that also use Eclipse with the plugin. That might go up to 80+ once other teams decide to use Gerrit in their process.
https://git.eclipse.org/r/36491
Ron, thanks for working on this. Since I haven't heard from you for a while, for now I'm assigning to mylyn-triaged so that somebody else can pick it up. It may be that we just need to merge your fix.
I'm ok with that. I can't promise to keep up - as I'm still under some heavy workload.
No worries at all, we appreciate what you've done so far..we're just going to try to get this into 3.14, these will be the last two fixes included.
Merged, thanks for another really helpful contribution Ron!
.
*** Bug 453455 has been marked as a duplicate of this bug. ***