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

Suspected incorrect check of methods from more complex interface inheritance chains #125

Open
stephenc opened this issue Aug 8, 2017 · 0 comments

Comments

@stephenc
Copy link
Member

stephenc commented Aug 8, 2017

https://github.com/stapler/stapler/blob/a6d86809e89dc1d48084201f97e19b602ed603ed/core/src/main/java/org/kohsuke/stapler/ClassDescriptor.java#L142 does not return all interfaces only all declared interfaces, e.g. if I have

interface A {
  @WebMethod("some-method")
  void someMethod(StaplerRequest req, StaplerResponse rsp);
}

interface B extends A {
  ...
}

public class C implements B {
  public void someMethod(StaplerRequest req, StaplerResponse rsp) {
    ...
  }
}

Then C.class.getInterfaces() will include B.class but not A.class

https://github.com/stapler/stapler/blob/311dcfd92d229569e7aaaaae364f6e702188fddc/jelly/src/main/java/org/kohsuke/stapler/jelly/AnnotationProcessorImpl.java#L79 may also need checking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant