On Tue, Jan 5, 2021 at 11:04 AM Ullrich Hafner ullrich...@gmail.com wrote:
Does the Jenkins maven HPI plugin somehow manipulates the byte code of descriptor classes?
Not in this respect Sounds like something being done by javac, though I am not sure what offhand. Did you confirm via javap
?
abstract class A {
public void method() {
}
}public class B extends A {
}
public abstract class A {
public void method() {
}
}
public class B extends A {
}
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH9u10mY7vGGvz2XcRksE8s0xZJ%3DXVNA4dxU432dPfYtJTLNrw%40mail.gmail.com.
Am 06.01.2021 um 14:27 schrieb John Patrick <nhoj.p...@gmail.com>:But both version of what you show above, if I execute 'new
B().method();' will trigger method in class A to be executed. Using
'javap' might change between the two versions.
That is how the language is designed to work regarding inheritance.
It's similar to how the compiler added a no-args constructor into your
class which calls the super no args constructor if you have not
defined a constructor yourself
If you don't want method in class A to be executed you'll need to
explicitly override it in class B. As not defining method in class B
will effectively make a method like 'public void method()
{super.method();}' as you have highlighted, but that is as expected
and isn't any bytecode manipulation tool, it's how the language is
designed to work.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH9u10nixBmGTQUJAZPSJY5-K%3DSkCYpv0BjurVq4ZUg-0gbVHg%40mail.gmail.com.
I have an architecture test that verifies that I have a call to Jenkins.hasPermission in any method that is accessible by Stapler.
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr10%3D_CwgCZ6EwD4EkqLP21EN8S3cK546LcgEwB7505v%2Bg%40mail.gmail.com.