Tapestry
  1. Tapestry
  2. TAPESTRY-2315

InjectContainerWorker should use this or other local variable name than "container"

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.12
    • Component/s: tapestry-core
    • Labels:
      None
    • Environment:
      any

      Description

      What I did:

      @InjectContainer
      private Field container;

      Resulted in: container == null

      The InjectContainerWorker uses "container" as the name of a temporary local variable, and the assignment is done to the field name:

      builder.addln("%s = (%s) container;", fieldName, fieldType);

      This resulted in:

      container = (org.apache.tapestry.Field) container;

      Thus my instance variable was never assigned to. Should probably be

      builder.addln("this.%s = (%s) container;", fieldName, fieldType);

      or use any other name for the temporary variable - might not be so uncommon for people to name the container "container", and can be very confusing.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        1d 17h 4m 1 Ted Steen 31/Mar/08 18:09
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568682 ] jira [ 12591711 ]
        Mark Thomas made changes -
        Workflow jira [ 12427683 ] Default workflow, editable Closed status [ 12568682 ]
        Ted Steen made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 5.0.12 [ 12313048 ]
        Status Open [ 1 ] Closed [ 6 ]
        Ted Steen made changes -
        Field Original Value New Value
        Assignee Ted Steen [ ted ]
        Wolfram Koska created issue -

          People

          • Assignee:
            Ted Steen
            Reporter:
            Wolfram Koska
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development