Class InterfaceMethodHierarchyUsage

java.lang.Object
samples.interfacemethodfinding.InterfaceMethodHierarchyUsage

public class InterfaceMethodHierarchyUsage extends Object
There was a bug in PowerMock 1.2 and its predecessors that made PowerMock WhiteboxImpl.getMethod(Class, Class...) fail when invoking proxified interface methods declared in extended interfaces. E.g. if interface A extends B invalid input: '&' C and a method was declared in B it wouldn't be found by WhiteboxImpl.getMethod(Class, Class...) since it only used to traverse the class hierarchy and not the structure of the extended interfaces. This was fixed in version 1.3 and this class is used to demonstrate the issue.

Thanks to Lokesh Vaddi for finding this bug and to provide an example.

  • Constructor Details

    • InterfaceMethodHierarchyUsage

      public InterfaceMethodHierarchyUsage()
  • Method Details

    • usePreparedStatement

      public void usePreparedStatement() throws Exception
      Throws:
      Exception