Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-62723] Fix behaviour of Util.isOverridden() #4833

Merged
merged 5 commits into from
Jul 15, 2020

Conversation

Zastai
Copy link
Contributor

@Zastai Zastai commented Jul 7, 2020

See JENKINS-62723.

Based on #4832 (which provides a unit test reproducing the issue)

Proposed changelog entries

  • JENKINS-62723: Fix IllegalArgumentException: Method not found error caused by misbehaviour in Util.isOverridden() (regression in 2.241)

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • 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

@jglick

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are correct
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

jglick and others added 4 commits July 7, 2020 10:15
It will now deal with final/abstract methods appropriately.
It will also clearly report bad arguments (base not base of derived, or base does not declare the method).
Added a unit test for interface cases.

Small gap to be looked into: overrides provided via default implementation of a (derived) interface.
This handles the remaining case (override provided by default implementation of an interface).
Copy link
Member

@jglick jglick 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 from a two-minute glance; did not study implementation deeply.

Does it fix the known bug?

core/src/main/java/hudson/Util.java Show resolved Hide resolved
core/src/main/java/hudson/Util.java Show resolved Hide resolved
core/src/main/java/hudson/Util.java Show resolved Hide resolved
core/src/main/java/hudson/Util.java Show resolved Hide resolved
core/src/main/java/hudson/Util.java Show resolved Hide resolved
@timja timja added the bug For changelog: Minor bug. Will be listed after features label Jul 8, 2020
@timja timja requested a review from a team July 8, 2020 07:05
@timja timja added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jul 12, 2020
@timja
Copy link
Member

timja commented Jul 12, 2020

This PR is ready to merge, and will be merged after 24 hours if there's no objection

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.

+1 from me, the change looks good. Thanks @Zastai !

@oleg-nenashev
Copy link
Member

I will merge it once the CI run passes

@timja timja merged commit f7ae11e into jenkinsci:master Jul 15, 2020
@Zastai Zastai deleted the JENKINS-62723 branch July 16, 2020 12:12
olivergondza pushed a commit to olivergondza/jenkins that referenced this pull request Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features 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