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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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"

       

       

       

       

       

            Assignee:
            Unassigned
            Reporter:
            Stephen Connolly
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: