[jira] [Commented] (TAP5-2453) Generic List not fully supported

2017-10-19 Thread Thiago H. de Paula Figueiredo (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16211303#comment-16211303
 ] 

Thiago H. de Paula Figueiredo commented on TAP5-2453:
-

Hello, [~jkemnade]!

None yet. I haven't had a chance to take a look yet. 

I agree with moving GenericsUtil from commons to plastic as long as we keep the 
package and class names unchanged, just as how it was done when the commons and 
beanmodel projects were created, so we don't break backward compatibility.

> Generic List not fully supported
> ---
>
> Key: TAP5-2453
> URL: https://issues.apache.org/jira/browse/TAP5-2453
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-ioc
>Affects Versions: 5.4, 5.3.8
>Reporter: Jan Mynařík
>  Labels: generics
> Attachments: TapestryGenericsTest.java
>
>
> I've created an abstract generic CRUD implementation. When binding 
> implementations resulting proxies doesn't fully report parametrized type via 
> reflections.
> See attached test. In 5.3.8 it fails in all asserts,  in 5.4 only in the last 
> one.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (TAP5-2032) GenericsUtils does not handle generics properly when extracting the actual type

2017-10-19 Thread Jochen Kemnade (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Kemnade updated TAP5-2032:
-
Labels:   (was: bulk-close-candidate)

> GenericsUtils does not handle generics properly when extracting the actual 
> type
> ---
>
> Key: TAP5-2032
> URL: https://issues.apache.org/jira/browse/TAP5-2032
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-ioc
>Affects Versions: 5.3.6, 5.5.0
>Reporter: DI Florian Hackenberger
>Assignee: Thiago H. de Paula Figueiredo
>
> We have the following interfaces / classes
> {code:java}
> public interface IPersonWithRoleAssociation extends 
> IEntityAssociationWithInfo {
>   PersonRole getRole();
>   void setRole(PersonRole role);
> }
> public interface IEntityAssociationWithInfo {
>   P getParent();
>   void setParent(P parent);
>   C getChild();
>   void setChild(C child);
> }
> public class Person implements Serializable {
>   
>   String name;
>   public String getName() {
>   return name;
>   }
> }
> {code}
> and the page:
> {code:java}
> public class EditPersonsWithRoles {
>   @Property(write=false) IPersonWithRoleAssociation personWithRole;
> }
> {code}
> and the template snippet:
> {code:html}
> 
> {code}
> Leads to the following exception:
> {noformat}
> Exception generating conduit for expression 'personWithRole.child.name': ...
> ...
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:388)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:128)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.extractActualType(GenericsUtils.java:74)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.buildGetterMethodAccessTerm(PropertyConduitSourceImpl.java:1119)
>  ~[tapestry-core-5.3.6.jar:na]
> {noformat}
> At GenericsUtils.java:388 we have:
> {code:java}
> resolved = ((ParameterizedType) t).getActualTypeArguments()[i];
> {code}
> where:
> {code:java}
> i = 1
> resolved = C
> ((ParameterizedType) t).getActualTypeArguments() = 
> [org.topfive.entities.IPersonWithRoleAssociation]
> {code}
> so the problem seems to be that the code assumes that it can find the type 
> information for C as the second generic parameter for 
> IPersonWithRoleAssociation, when in fact is is the second generic parameter 
> for the superclass IEntityAssociationWithInfo which 
> IPersonWithRoleAssociation extends and passes C explicitly (Person). 
> Everything is fine, if I use a marker interface for Person (IPerson) and 
> declare:
> {code:java}
> public interface IPersonWithRoleAssociation extends 
> IEntityAssociationWithInfo
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (TAP5-2032) GenericsUtils does not handle generics properly when extracting the actual type

2017-10-19 Thread Jochen Kemnade (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Kemnade updated TAP5-2032:
-
Description: 
We have the following interfaces / classes
{code:java}
public interface IPersonWithRoleAssociation extends 
IEntityAssociationWithInfo {
PersonRole getRole();
void setRole(PersonRole role);
}

public interface IEntityAssociationWithInfo {
P getParent();
void setParent(P parent);

C getChild();
void setChild(C child);
}

public class Person implements Serializable {

String name;
public String getName() {
return name;
}
}
{code}
and the page:
{code:java}
public class EditPersonsWithRoles {
@Property(write=false) IPersonWithRoleAssociation personWithRole;
}
{code}
and the template snippet:
{code:html}

{code}
Leads to the following exception:
{noformat}
Exception generating conduit for expression 'personWithRole.child.name': ...
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:388)
 ~[tapestry-ioc-5.3.6.jar:na]
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:128)
 ~[tapestry-ioc-5.3.6.jar:na]
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.extractActualType(GenericsUtils.java:74)
 ~[tapestry-ioc-5.3.6.jar:na]
at 
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.buildGetterMethodAccessTerm(PropertyConduitSourceImpl.java:1119)
 ~[tapestry-core-5.3.6.jar:na]
{noformat}
At GenericsUtils.java:388 we have:
{code:java}
resolved = ((ParameterizedType) t).getActualTypeArguments()[i];
{code}
where:
{code:java}
i = 1
resolved = C
((ParameterizedType) t).getActualTypeArguments() = 
[org.topfive.entities.IPersonWithRoleAssociation]
{code}
so the problem seems to be that the code assumes that it can find the type 
information for C as the second generic parameter for 
IPersonWithRoleAssociation, when in fact is is the second generic parameter for 
the superclass IEntityAssociationWithInfo which IPersonWithRoleAssociation 
extends and passes C explicitly (Person). Everything is fine, if I use a marker 
interface for Person (IPerson) and declare:
{code:java}
public interface IPersonWithRoleAssociation extends 
IEntityAssociationWithInfo
{code}

  was:
We have the following interfaces / classes

public interface IPersonWithRoleAssociation extends 
IEntityAssociationWithInfo {
PersonRole getRole();
void setRole(PersonRole role);
}

public interface IEntityAssociationWithInfo {
P getParent();
void setParent(P parent);

C getChild();
void setChild(C child);
}

public class Person implements Serializable {

String name;
public String getName() {
return name;
}
}

and the page:

public class EditPersonsWithRoles {
@Property(write=false) IPersonWithRoleAssociation personWithRole;
}

and the template snippet:



Leads to the following exception:

Exception generating conduit for expression 'personWithRole.child.name': ...
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:388)
 ~[tapestry-ioc-5.3.6.jar:na]
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:128)
 ~[tapestry-ioc-5.3.6.jar:na]
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.extractActualType(GenericsUtils.java:74)
 ~[tapestry-ioc-5.3.6.jar:na]
at 
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.buildGetterMethodAccessTerm(PropertyConduitSourceImpl.java:1119)
 ~[tapestry-core-5.3.6.jar:na]

At GenericsUtils.java:388 we have:
resolved = ((ParameterizedType) t).getActualTypeArguments()[i];
where:
i = 1
resolved = C
((ParameterizedType) t).getActualTypeArguments() = 
[org.topfive.entities.IPersonWithRoleAssociation]

so the problem seems to be that the code assumes that it can find the type 
information for C as the second generic parameter for 
IPersonWithRoleAssociation, when in fact is is the second generic parameter for 
the superclass IEntityAssociationWithInfo which IPersonWithRoleAssociation 
extends and passes C explicitly (Person). Everything is fine, if I use a marker 
interface for Person (IPerson) and declare:

public interface IPersonWithRoleAssociation extends 
IEntityAssociationWithInfo


> GenericsUtils does not handle generics properly when extracting the actual 
> type
> ---
>
> Key: TAP5-2032
> URL: 

[jira] [Reopened] (TAP5-2032) GenericsUtils does not handle generics properly when extracting the actual type

2017-10-19 Thread Jochen Kemnade (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Kemnade reopened TAP5-2032:
--

I can actually reproduce a variation of this in the 5.5.0 alphas (thanks 
[~mihasik] for spotting it in the first place).
{code:java}
public interface IdentifiableEnum, ID extends Number> {
  ID getId();
}

public enum ById implements IdentifiableEnum {
  public Byte getId() {
return null;
  }
}

new PropertyAccessImpl().getAdapter(ById.class)
{code}
produces
{noformat}
...
Caused by: java.lang.RuntimeException: 
java.lang.ArrayIndexOutOfBoundsException: 1
at 
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.buildAdapter(PropertyAccessImpl.java:116)
at 
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.getAdapter(PropertyAccessImpl.java:80)
at ioc.specs.PropertyAccessImplSpec.Build adapter for enum implementing 
generic interface(PropertyAccessImplSpec.groovy:827)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:386)
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:126)
at 
org.apache.tapestry5.ioc.internal.util.GenericsUtils.extractGenericReturnType(GenericsUtils.java:39)
at 
org.apache.tapestry5.ioc.internal.services.ClassPropertyAdapterImpl.(ClassPropertyAdapterImpl.java:115)
at 
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.buildAdapter(PropertyAccessImpl.java:112)
... 2 more
{noformat}

> GenericsUtils does not handle generics properly when extracting the actual 
> type
> ---
>
> Key: TAP5-2032
> URL: https://issues.apache.org/jira/browse/TAP5-2032
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-ioc
>Affects Versions: 5.3.6, 5.5.0
>Reporter: DI Florian Hackenberger
>Assignee: Thiago H. de Paula Figueiredo
>  Labels: bulk-close-candidate
>
> We have the following interfaces / classes
> public interface IPersonWithRoleAssociation extends 
> IEntityAssociationWithInfo {
>   PersonRole getRole();
>   void setRole(PersonRole role);
> }
> public interface IEntityAssociationWithInfo {
>   P getParent();
>   void setParent(P parent);
>   C getChild();
>   void setChild(C child);
> }
> public class Person implements Serializable {
>   
>   String name;
>   public String getName() {
>   return name;
>   }
> }
> and the page:
> public class EditPersonsWithRoles {
>   @Property(write=false) IPersonWithRoleAssociation personWithRole;
> }
> and the template snippet:
> 
> Leads to the following exception:
> Exception generating conduit for expression 'personWithRole.child.name': ...
> ...
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:388)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:128)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.extractActualType(GenericsUtils.java:74)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.buildGetterMethodAccessTerm(PropertyConduitSourceImpl.java:1119)
>  ~[tapestry-core-5.3.6.jar:na]
> At GenericsUtils.java:388 we have:
> resolved = ((ParameterizedType) t).getActualTypeArguments()[i];
> where:
> i = 1
> resolved = C
> ((ParameterizedType) t).getActualTypeArguments() = 
> [org.topfive.entities.IPersonWithRoleAssociation]
> so the problem seems to be that the code assumes that it can find the type 
> information for C as the second generic parameter for 
> IPersonWithRoleAssociation, when in fact is is the second generic parameter 
> for the superclass IEntityAssociationWithInfo which 
> IPersonWithRoleAssociation extends and passes C explicitly (Person). 
> Everything is fine, if I use a marker interface for Person (IPerson) and 
> declare:
> public interface IPersonWithRoleAssociation extends 
> IEntityAssociationWithInfo



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (TAP5-2032) GenericsUtils does not handle generics properly when extracting the actual type

2017-10-19 Thread Jochen Kemnade (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Kemnade updated TAP5-2032:
-
Affects Version/s: 5.5.0

> GenericsUtils does not handle generics properly when extracting the actual 
> type
> ---
>
> Key: TAP5-2032
> URL: https://issues.apache.org/jira/browse/TAP5-2032
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-ioc
>Affects Versions: 5.3.6, 5.5.0
>Reporter: DI Florian Hackenberger
>Assignee: Thiago H. de Paula Figueiredo
>  Labels: bulk-close-candidate
>
> We have the following interfaces / classes
> public interface IPersonWithRoleAssociation extends 
> IEntityAssociationWithInfo {
>   PersonRole getRole();
>   void setRole(PersonRole role);
> }
> public interface IEntityAssociationWithInfo {
>   P getParent();
>   void setParent(P parent);
>   C getChild();
>   void setChild(C child);
> }
> public class Person implements Serializable {
>   
>   String name;
>   public String getName() {
>   return name;
>   }
> }
> and the page:
> public class EditPersonsWithRoles {
>   @Property(write=false) IPersonWithRoleAssociation personWithRole;
> }
> and the template snippet:
> 
> Leads to the following exception:
> Exception generating conduit for expression 'personWithRole.child.name': ...
> ...
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:388)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.resolve(GenericsUtils.java:128)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.ioc.internal.util.GenericsUtils.extractActualType(GenericsUtils.java:74)
>  ~[tapestry-ioc-5.3.6.jar:na]
>   at 
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.buildGetterMethodAccessTerm(PropertyConduitSourceImpl.java:1119)
>  ~[tapestry-core-5.3.6.jar:na]
> At GenericsUtils.java:388 we have:
> resolved = ((ParameterizedType) t).getActualTypeArguments()[i];
> where:
> i = 1
> resolved = C
> ((ParameterizedType) t).getActualTypeArguments() = 
> [org.topfive.entities.IPersonWithRoleAssociation]
> so the problem seems to be that the code assumes that it can find the type 
> information for C as the second generic parameter for 
> IPersonWithRoleAssociation, when in fact is is the second generic parameter 
> for the superclass IEntityAssociationWithInfo which 
> IPersonWithRoleAssociation extends and passes C explicitly (Person). 
> Everything is fine, if I use a marker interface for Person (IPerson) and 
> declare:
> public interface IPersonWithRoleAssociation extends 
> IEntityAssociationWithInfo



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


tapestry-5 git commit: work around build timeouts

2017-10-19 Thread jkemnade
Repository: tapestry-5
Updated Branches:
  refs/heads/master ef290f536 -> 6d69eb9a7


work around build timeouts


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6d69eb9a
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6d69eb9a
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6d69eb9a

Branch: refs/heads/master
Commit: 6d69eb9a7d77b112d28df1b6ee1e60ae42878e48
Parents: ef290f5
Author: Jochen Kemnade 
Authored: Thu Oct 19 08:34:32 2017 +0200
Committer: Jochen Kemnade 
Committed: Thu Oct 19 08:34:32 2017 +0200

--
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6d69eb9a/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index aa9100b..eb3b917 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,7 +10,7 @@ before_install:
 
 
 install: /bin/true
-script: ./gradlew -Dci=true continuousIntegration
+script: travis_wait ./gradlew -Dci=true continuousIntegration
 
 cache:
   directories: