Tapestry
  1. Tapestry
  2. TAPESTRY-1374

GenericsMethodSignatureImpl throw exception!

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.2
    • Component/s: Framework
    • Labels:
      None

      Description

      public class GenericTest {

      @Test
      public void test_find_type() {
      Class clazz=TestGeneric.class;
      Method[] ms = clazz.getMethods();
      for (Method m : ms)

      { System.out.println(m.getName()); new GenericsMethodSignatureImpl( clazz, m); }

      }

      public class TestGeneric<T> extends BaseGeneric<T>{

      }
      public class BaseGeneric<T> {
      public IPage doDeleteEntityAction(T entity)

      { return null; }

      }

      }

      throw:

      java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl
      at org.apache.tapestry.enhance.GenericsMethodSignatureImpl.findType(GenericsMethodSignatureImpl.java:73)
      at org.apache.tapestry.enhance.GenericsMethodSignatureImpl.findParameterTypes(GenericsMethodSignatureImpl.java:98)
      at org.apache.tapestry.enhance.GenericsMethodSignatureImpl.<init>(GenericsMethodSignatureImpl.java:32)

        Activity

        Hide
        Jesse Kuhnert added a comment -

        Fixed.

        Show
        Jesse Kuhnert added a comment - Fixed.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Jun Tsai
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development