Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1834

Fields not rewritten when modifying existing methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 5.0.6
    • 5.0.7
    • tapestry-core
    • 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

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hagios17 Dan Adams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: