Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-739

Do not throw exception for quiet references in strict reference checking mode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.6.2
    • None
    • Engine
    • None

    Description

      I used strict reference checking for the first time and discovered that it throws exceptions even for quiet references.

      <input class="signupInput" type="text" id="StxtFirstNames"
      name="firstName" value="$!user.firstName"/>

      org.apache.velocity.exception.MethodInvocationException: Variable
      $user has not been set at layout/slide_login.vm[line 13, column 117]

      This doesn't make sense to me. If a template author designates a reference as quiet, it's explicitly not an error. We're preventing the use of this convenient feature.

      It's not a hard change to fix this. Does it break backwards compatibility if we change this?

      Incidentally, there's an identical problem for InvalidReferenceEventHandler. I'll file a separate issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wglass William Glass-Husain
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: