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

        Jun Tsai created issue -
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Fix Version/s 4.1.2 [ 12312202 ]
        Jesse Kuhnert made changes -
        Assignee Jesse Kuhnert [ jkuhnert ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12399846 ] Default workflow, editable Closed status [ 12569202 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12569202 ] jira [ 12590458 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development