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

Felix Scheffer commented on TAP5-2268:
--------------------------------------

Looks like 5.4 is not affected:

{code}
Caused by: java.lang.IllegalArgumentException: Unable to create new accessor 
method public com.fscheffer.testproject.TestObject2 getRow() on class 
com.fscheffer.testproject.pages.Test as the method is already implemented.
        at 
org.apache.tapestry5.internal.plastic.PlasticFieldImpl.introduceAccessorMethod(PlasticFieldImpl.java:363)
        at 
org.apache.tapestry5.internal.plastic.PlasticFieldImpl.createAccessors(PlasticFieldImpl.java:322)
        at 
org.apache.tapestry5.internal.plastic.PlasticFieldImpl.createAccessors(PlasticFieldImpl.java:305)
        at 
org.apache.tapestry5.internal.transform.PropertyWorker.createAccessorsForField(PropertyWorker.java:47)
        at 
org.apache.tapestry5.internal.transform.PropertyWorker.transform(PropertyWorker.java:39)
        at $ComponentClassTransformWorker2_2c41b30bbab9.transform(Unknown 
Source)
        at $ComponentClassTransformWorker2_2c41b30bbaab.transform(Unknown 
Source)
        at 
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$3.run(ComponentInstantiatorSourceImpl.java:316)
        at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:56)
        ... 76 more
{code}

Close as fixed in 5.4?

> @Property may generate a method that conflicts with an existing one, without 
> error, and with unpredictable results
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-2268
>                 URL: https://issues.apache.org/jira/browse/TAP5-2268
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.7
>            Reporter: Alexey Chalov
>            Priority: Minor
>
> Page class can contain 2 conflicting pieces for displaying html table like 
> that:
> @Property(write=false)
> private List<Item> items;
> or
> public GridDataSource getItems() {
>     ....
> }
> This causes no error then these 2 constructs present in page class, but 
> behaviour is unpredictable: either accessor for GridDataSource or property 
> generated accessor can be used when page is generated. Restarting/redeploying 
> application can change this behaviour to any of these 2 choices in 
> unpredictable manner. More oftenly (as I noticed 90% data source accessor is 
> used when table content is generated), but about ~10% is left on generated 
> accessor. Tested under Tomcat 7.
> It would be nice if exception will rise in such situaеions to prevent 
> accidental programming error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to