Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56660

If the child class overrides a method and marks the override as final Util.isOverridden should return true

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      See https://github.com/jenkinsci/jenkins/blob/2263ad03ab8aa481caa3918c8671b1d605514b15/core/src/main/java/hudson/Util.java#L1345

      What is wrong with final methods in the derived class

       

      public class Parent {
        public Object doThing() {}
      }
      
      public class Child extends Parent {
        @Override
        public final Object doThing() { ... } 
      }
      
      assert Util.isOverridden(Parent.class, Child.class, "doThing") : "Sadly this is not true for the past 4 years"

       

       

       

       

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              stephenconnolly Stephen Connolly
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: