* <p>
* If you have exceptions or bad results with classes using Generics, such as exceptions
* or missing BeanModel properties,
- * you should try adding the <code>genericsresolver-guava<code> Tapestry subproject to our classpath.
+ * you should try adding the <code>genericsresolver-guava</code> Tapestry subproject to our classpath.
* </p>
*
* @since 5.5.0
* @param containingClass class which either contains or inherited the method
* @param method method from which to extract the return type
* @return the class represented by the methods generic return type, resolved based on the context .
- * @see #extractActualType(java.lang.reflect.Type, java.lang.reflect.Method)
* @see #resolve(java.lang.reflect.Type,java.lang.reflect.Type)
* @see #asClass(java.lang.reflect.Type)
*/
* Analyzes the field in the context of containingClass and returns the Class that is represented by
* the field's generic type. Any parameter information in the generic type is lost, if you want
* to preserve the type parameters of the return type consider using
- * {@link #getTypeVariableIndex(java.lang.reflect.TypeVariable)}.
+ * #getTypeVariableIndex(java.lang.reflect.TypeVariable).
*
* @param containingClass class which either contains or inherited the field
* @param field field from which to extract the type
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.Registry;
import org.apache.tapestry5.ioc.RegistryBuilder;
+import org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl;
import org.apache.tapestry5.ioc.test.IOCTestCase;
import org.apache.tapestry5.ioc.util.UnknownValueException;
import org.apache.tapestry5.modules.TapestryModule;
}
+ // https://issues.apache.org/jira/browse/TAP5-2032
+ @Test
+ public void tap5_2032()
+ {
+ // explodes without fix
+ new PropertyAccessImpl().getAdapter(ById.class);
+ }
+
+ public interface IdentifiableEnum<E extends Enum<E>, ID extends Number>
+ {
+ ID getId();
+ }
+
+ public enum ById implements IdentifiableEnum<ById, Byte>
+ {
+ ;
+ public Byte getId()
+ {
+ return null;
+ }
+ }
final private static class SortableBean
{