Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1966

Plastic should throw an exception when it attempts to redefine an existing method unexpectedly

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.3.3
    • 5.4
    • plastic

    Description

      For example, we have page class; page shows "select" component on corresponsing page :

      public class FooPage {
      ...

      // now let's define Property "organizations"

      @Property
      private List<Organization> organizations;

      // we create method for getting SelectModel class for "select" component

      public SelectModel getOrganizations() {
      ... blablabla
      }

      ...
      }

      And on page:

      ...
      <t:select t:id="organization" model="getOrganizations" value="user.organization" encoder="getValueEncoder()"/>
      ...

      Ok. What's happen now? The behaivour of this situation is not defined. Tapestry can invoke "SelectModel getOrganizations()" or "List<Organization> getOrganizations()" in arbitrary order (it is clear why).

      It would be good, if Plastic throws an exception, when it redefines getter which already exists.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            andremoniy Andrei Arapov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment