You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2019/01/17 02:56:50 UTC
tapestry-5 git commit: TAP5-2560: fixing JavaDoc errors and adding
one test for TAP5-2032
Repository: tapestry-5
Updated Branches:
refs/heads/master 7590909a2 -> a02bf98bc
TAP5-2560: fixing JavaDoc errors and adding one test for TAP5-2032
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/a02bf98b
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/a02bf98b
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/a02bf98b
Branch: refs/heads/master
Commit: a02bf98bcaa57e471ea472a53e2f4ee08d152676
Parents: 7590909
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
Authored: Thu Jan 17 00:56:39 2019 -0200
Committer: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
Committed: Thu Jan 17 00:56:39 2019 -0200
----------------------------------------------------------------------
.../tapestry5/services/GenericsResolver.java | 5 ++---
.../AbstractBeanModelSourceImplTest.java | 22 ++++++++++++++++++++
2 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a02bf98b/commons/src/main/java/org/apache/tapestry5/services/GenericsResolver.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/tapestry5/services/GenericsResolver.java b/commons/src/main/java/org/apache/tapestry5/services/GenericsResolver.java
index aa1e8de..4d9766b 100644
--- a/commons/src/main/java/org/apache/tapestry5/services/GenericsResolver.java
+++ b/commons/src/main/java/org/apache/tapestry5/services/GenericsResolver.java
@@ -27,7 +27,7 @@ import org.apache.tapestry5.internal.services.GenericsResolverImpl;
* <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
@@ -44,7 +44,6 @@ public interface GenericsResolver
* @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)
*/
@@ -54,7 +53,7 @@ public interface GenericsResolver
* 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
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a02bf98b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/AbstractBeanModelSourceImplTest.java
----------------------------------------------------------------------
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/AbstractBeanModelSourceImplTest.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/AbstractBeanModelSourceImplTest.java
index 61608b2..48927f9 100644
--- a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/AbstractBeanModelSourceImplTest.java
+++ b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/AbstractBeanModelSourceImplTest.java
@@ -25,6 +25,7 @@ import org.apache.tapestry5.ioc.AnnotationProvider;
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;
@@ -766,6 +767,27 @@ public abstract class AbstractBeanModelSourceImplTest extends IOCTestCase
}
+ // 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
{