Uploaded image for project: 'Portals Bridges'
  1. Portals Bridges
  2. PB-74

Safe creation of context in GenericVelocityPortlet for JS2's new feature, auto-dispatching for edit_defaults mode.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.0.4
    • Component/s: velocity
    • Labels:
      None
    • Environment:
      Probably on Jetspeed-2.1.3 or later. (Jetspeed-2.1.3 will probably be released soon.)
      When the option, auto-dispatching for edit_defaults mode is turned on.

      Description

      The GenericVelocityPortlet assumes that doEdit() method would be invoked after render() method.
      And, it creates a context in overriden render() method for later use.
      However, if JS2's auto-dispatching for edit_defaults mode option is turned on, JS2 would try to invoke doEdit() method directly without invoking render() method.
      Meanwhile, if a GenericVelocityPortlet is not invoked via render() method, it will throw an NPE because the context is null.
      So, the context object should be treated safer in doEdit() phase. That is, if the context is null in doEdit() phase, it should initialize there for more safety.

        Attachments

          Activity

            People

            • Assignee:
              woon_san Woonsan Ko
              Reporter:
              woon_san Woonsan Ko
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: