Class InterfaceMethodHierarchyUsage


  • public class InterfaceMethodHierarchyUsage
    extends java.lang.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 & 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 Detail

      • InterfaceMethodHierarchyUsage

        public InterfaceMethodHierarchyUsage()
    • Method Detail

      • usePreparedStatement

        public void usePreparedStatement()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception