Uploaded image for project: 'S2Container'
  1. S2Container
  2. CONTAINER-350

インターセプタをS2以外で使うとエラー

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.3.23, 2.4.34
    • Fix Version/s: None
    • Component/s: S2Container
    • Labels:
      None

      Description

      Class thisClass = invocation.getThis().getClass();
      Class superClass = thisClass.getSuperclass();
      if (superClass == Object.class)

      { return thisClass.getInterfaces()[0]; }

      return superClass;

      のthisClass.getInterfaces()[0]でぬるぽ。
      メソッドがインターフェースのものかチェックが必要。

      Class thisClass = invocation.getThis().getClass();
      も、staticメソッドの場合も考慮して
      method.getDeclaringClass();
      の方が無難。

        Attachments

          Activity

            People

            • Assignee:
              higa higa
              Reporter:
              kimura kimura
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: