Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NPE in unverify plugin when run by auto change cleanup

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
backend

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.