NPE in unverify plugin when run by auto change cleanup
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in DLSUnverify.java at onChangeAbandoned, especially line 130 where the stack trace identifies the NullPointerException, and inspect how the change-abandoned event is handled. Reproduce or trace the auto abandon change cleanup path described in the issue. Done means that path no longer raises an NPE when the event has no username or name.
Written by the indexing model from the issue text.
Description
If the Gerrit server is configured with the auto abandon change cleanup then when this plugin is called there is a NPE. Looking at the messages on these changes the issue is probably that the event doesn't have a username/name.
The NPE is on line 130:
event.getWho().username, event.getWho().name, event.getChange()._number);
The stack trace is:
er@159c4f35[Wrapped task = com.google.gerrit.server.logging.LoggingContextAwareRunnable@1a4eb392]]]] WARN com.google.gerrit.server.plugincontext.PluginContext : Failure in class uk.ac.diamond.daq.gerrit.plugin.unverify.DLSUnverify of plugin DLS-unverify
java.lang.NullPointerException
at uk.ac.diamond.daq.gerrit.plugin.unverify.DLSUnverify.onChangeAbandoned(DLSUnverify.java:130)
at com.google.gerrit.server.extensions.events.ChangeAbandoned.lambda$fire$0(ChangeAbandoned.java:70)
at com.google.gerrit.server.plugincontext.PluginContext.runLogExceptions(PluginContext.java:214)
at com.google.gerrit.server.plugincontext.PluginSetContext.lambda$runEach$1(PluginSetContext.java:148)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.google.gerrit.server.plugincontext.PluginSetContext.runEach(PluginSetContext.java:148)
at com.google.gerrit.server.extensions.events.ChangeAbandoned.fire(ChangeAbandoned.java:70)
at com.google.gerrit.server.change.AbandonOp.postUpdate(AbandonOp.java:127)
at com.google.gerrit.server.update.BatchUpdate.executePostOps(BatchUpdate.java:902)
at com.google.gerrit.server.update.BatchUpdate.execute(BatchUpdate.java:189)
at com.google.gerrit.server.update.BatchUpdate.execute(BatchUpdate.java:488)
at com.google.gerrit.server.change.BatchAbandon.batchAbandon(BatchAbandon.java:90)
at com.google.gerrit.server.change.BatchAbandon.batchAbandon(BatchAbandon.java:106)
at com.google.gerrit.server.change.AbandonUtil.abandonInactiveOpenChanges(AbandonUtil.java:87)
at com.google.gerrit.server.change.ChangeCleanupRunner.lambda$run$0(ChangeCleanupRunner.java:86)
at com.google.gerrit.server.update.RetryableChangeAction.lambda$new$0(RetryableChangeAction.java:48)
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
[BUG] S3 CORS responses omit Access-Control-Allow-Credentials for matched originsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
floci-io/floci#5369 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sqlcipher/sqlcipher-android#97 · 1 comment ·
-
area-integrations
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug IIIF interoperability
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100