Velocity Tools
  1. Velocity Tools
  2. VELTOOLS-112

Suggestion to move VelocityViewServlet.fillContext into handleRequest

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: VelocityView
    • Labels:
      None

      Description

      If retaining VelocityViewServlet.handleRequest(req, res, ctx), then I would suggest moving fillContext(ctx, req) into it rather than leaving it in doRequest. This way it saves a "do nothing" method call if handleRequest is overridden (which it had to be when extending VelocityServlet) instead of overriding fillContext and getTemplate.

        Activity

        Hide
        Nathan Bubna added a comment -

        No, fillContext was separate in VelocityTools1.4 release and will stay separate for 2.0 both for backwards compatibility and because i prefer it to be called before setContentType. The JVM should have no trouble optimizing a "do nothing" call out.

        Show
        Nathan Bubna added a comment - No, fillContext was separate in VelocityTools1.4 release and will stay separate for 2.0 both for backwards compatibility and because i prefer it to be called before setContentType. The JVM should have no trouble optimizing a "do nothing" call out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Steve Hale
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development