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

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

XMLWordPrintable

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

      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();
      の方が無難。

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

              Created:
              Updated:
              Resolved: