You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2007/11/30 21:32:43 UTC
[jira] Commented: (TAPESTRY-1834) Fields not rewritten when
modifying existing methods
[ https://issues.apache.org/jira/browse/TAPESTRY-1834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547274 ]
Howard M. Lewis Ship commented on TAPESTRY-1834:
------------------------------------------------
One size doesn't fit all, so I'm adding a new method: extendExistingMethod() which allows some new behavior to be added but doesn't prevent the field transformations from occuring in the original method body.
> Fields not rewritten when modifying existing methods
> ----------------------------------------------------
>
> Key: TAPESTRY-1834
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1834
> Project: Tapestry
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.6
> Reporter: Dan Adams
> Priority: Blocker
> Attachments: tapestry-core-patch-r584927.txt
>
>
> After doing some exploratory testing this actually is a problem and can be reproduced with the following test page:
> public class TestPrefixMethod
> {
> @InjectPage
> private TestPrefixMethod2 _otherPage;
>
> @PlusOne
> public int getValue() {
> // call hashCode() just to access the injected member
> int value = _otherPage.hashCode();
> return value * 0;
> }
> }
> @PlusOne is a test annotation that simply returns the method value + 1. When you call getValue() it should return 1 but instead you get an exception:
> java.lang.NoSuchFieldError: _otherPage
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org