You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Dan Adams (JIRA)" <de...@tapestry.apache.org> on 2007/10/16 16:28:50 UTC
[jira] Created: (TAPESTRY-1834) Fields not rewritten when modifying
existing methods
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
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
[jira] Updated: (TAPESTRY-1834) Fields not rewritten when modifying
existing methods
Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Adams updated TAPESTRY-1834:
--------------------------------
Attachment: tapestry-core-patch-r584927.txt
Test I used to reproduce.
> 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
[jira] Closed: (TAPESTRY-1834) Fields not rewritten when modifying
existing methods
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-1834.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.7
Assignee: Howard M. Lewis Ship
> 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
> Assignee: Howard M. Lewis Ship
> Priority: Blocker
> Fix For: 5.0.7
>
> 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
[jira] Commented: (TAPESTRY-1834) Fields not rewritten when
modifying existing methods
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ 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