Skip to content

Introduce new Run#getBuildsOverThreshold() method for getting runs above the desired execution result#4259

Merged
oleg-nenashev merged 3 commits intojenkinsci:masterfrom
jsoref:java-cleanup-Run.getBuildsOverThreshold
Oct 22, 2019
Merged

Introduce new Run#getBuildsOverThreshold() method for getting runs above the desired execution result#4259
oleg-nenashev merged 3 commits intojenkinsci:masterfrom
jsoref:java-cleanup-Run.getBuildsOverThreshold

Conversation

@jsoref
Copy link
Contributor

@jsoref jsoref commented Oct 3, 2019

Refactored as Run.getBuildsOverThreshold
This is for discussion.

Notes:

  • Most commits were created by IntelliJ
  • Individual commits are mostly self contained
  • In general, most commits should not change program behavior at all

This is generally a subset of https://github.com/jsoref/jenkins/commits/java-cleanup-full

Proposed changelog entries

  • Internal: Internal Java code cleanup

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

Refactored as Run.getBuildsOverThreshold
@jsoref jsoref mentioned this pull request Oct 3, 2019
4 tasks
@jsoref jsoref changed the title IntelliJ/Java: Duplicate code IntelliJ/Java: Duplicate code -> Run.getBuildsOverThreshold Oct 3, 2019
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor comment

Co-Authored-By: Oleg Nenashev <[email protected]>
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, ready to go?

@daniel-beck daniel-beck added the plugin-api-changes Changes the API of Jenkins available for use in plugins. label Oct 11, 2019
@oleg-nenashev oleg-nenashev added ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback developer Changes which impact plugin developers labels Oct 17, 2019
@oleg-nenashev oleg-nenashev changed the title IntelliJ/Java: Duplicate code -> Run.getBuildsOverThreshold Introduce new Run#getBuildsOverThreshold() method for getting runs above the desired execution result Oct 17, 2019
@oleg-nenashev
Copy link
Member

I plan to merge it tomorrow if no negative feedback

@oleg-nenashev oleg-nenashev merged commit cc83bf0 into jenkinsci:master Oct 22, 2019
@jsoref jsoref deleted the java-cleanup-Run.getBuildsOverThreshold branch October 23, 2019 17:20
mawinter69 added a commit to mawinter69/jenkins that referenced this pull request Dec 28, 2025
Found while working with calendar-view plugin.
Change jenkinsci#4259 introduced a potential NPE in Job#getLastBuildsOverThreshold
when a job has no runs.
calendar-view plugin is the only user of that method it seems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer Changes which impact plugin developers plugin-api-changes Changes the API of Jenkins available for use in plugins. ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants