Description
Description
Retrieving http://localhost:8085/rest/api/latest/result/TEST-TEST.json?expand=results.result.vcsRevisions.vcsRevision.changes.change fails with NullPointerException when it contains a build referencing a commit and the corresponding repository has been deleted. However, displaying the build, commit etc. in the web interface seems to work.
java.lang.NullPointerException at com.atlassian.bamboo.plugins.rest.model.build.change.RestChange.expand(RestChange.java:134) at com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:12) at com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:5) at com.atlassian.plugins.rest.common.expand.AbstractRecursiveEntityExpander.expand(AbstractRecursiveEntityExpander.java:9) [...]
Reproduce the issue
- Create a new Plan (e.g. TEST) using a Git or Subversion repository (Job with only checkout task suffices)
- Trigger the build of the plan manually
- Commit and push a change to the repository
- Let Bamboo build the plan with the change (using Repository polling trigger)
- Modify the plan: remove repository
- Might be optional: add the same repository again
- Open REST URL http://localhost:8085/rest/api/latest/result/TEST-TEST.json?expand=results.result.vcsRevisions.vcsRevision.changes.change (assuming both project and job have key "TEST")
Attachments
Issue Links
- was cloned as
-
BDEV-10081 Loading...