[JENKINS-57694] Fix SpecificRevisionBuildChooser#getDisplayName() #760
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JENKINS-57694 - Fix SpecificRevisionBuildChooser#getDisplayName()
old description
All otherBuildChooser
s already have aDescriptor
. This missingDescriptor
was causing an exception whenBuildChooser#getDisplayName()
was called withinGitSCM#compareRemoteRevisionWithImpl()
to log its name.TheDescriptor
was once already in place but then removed in commit 75e7880 because theSpecificRevisionBuildChooser
is not meant to be selectable by a user in the UI.The better way (because aDescribable
should have aDescriptor
) to describe this fact is to overwriteisApplicable()
to always returnfalse
.new description
There may be
BuildChooser
s that don't have aDescriptor
because they are not meant to be selectable by a user in the UI. CurrentlySpecificRevisionBuildChooser
is such aBuildChooser
.This missing
Descriptor
was causing an exception whenBuildChooser#getDisplayName()
was called withinGitSCM#compareRemoteRevisionWithImpl()
to log its name.The
Descriptor
was once already in place but then removed in commit 75e7880 because theSpecificRevisionBuildChooser
is not meant to be selectable by a user in the UI.Therefore the absence of a
Descriptor
has to be handled.Checklist
Types of changes