Skip to content

Conversation

@felfert
Copy link
Member

@felfert felfert commented Jan 27, 2026

When deleting a JClouds node that was restored from disk after a jenkins restart, hudson.model.Slave.drainLabelsToTrim() failed with an NPE, because previouslyAssignedLabels was NULL. Reason for that was: JCLoudsSlave provided a readResolve() which did not override. Therefore, hudson.model.Slave.readResolve() was never called when reloading from disk.

This PR adds an @Override and an invocation of super.readResolve() which initializes previouslyAssignedLabels.

Testing done

Manually create a JClouds node, then restart jenkins, then delete that node.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

When deleting a JClouds node that was restored from disk after a jenkins
restart, hudson.model.Slave.drainLabelsToTrim() failed with an NPE,
because previouslyAssignedLabels was NULL. Reason for that was:
JCLoudsSlave provided a readResolve() which did not override.
Therefore, hudson.model.Slave.readResolve() was never called when
reloading from disk.
@felfert felfert requested a review from a team as a code owner January 27, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant