Tapestry
  1. Tapestry
  2. TAPESTRY-1834

Fields not rewritten when modifying existing methods

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0.6
    • Fix Version/s: 5.0.7
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      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

        Activity

        Dan Adams created issue -
        Hide
        Dan Adams added a comment -

        Test I used to reproduce.

        Show
        Dan Adams added a comment - Test I used to reproduce.
        Dan Adams made changes -
        Field Original Value New Value
        Attachment tapestry-core-patch-r584927.txt [ 12367821 ]
        Hide
        Howard M. Lewis Ship added a comment -

        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.

        Show
        Howard M. Lewis Ship added a comment - 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.
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Howard M. Lewis Ship [ hlship ]
        Resolution Fixed [ 1 ]
        Fix Version/s 5.0.7 [ 12312802 ]
        Mark Thomas made changes -
        Workflow jira [ 12415173 ] Default workflow, editable Closed status [ 12568352 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568352 ] jira [ 12591413 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        45d 6h 17m 1 Howard M. Lewis Ship 30/Nov/07 20:45

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Dan Adams
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development