Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2615

Generated serialization JS should not pretend to have "block scope"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • Invalid
    • JavaScript Client
    • None
    • Unknown

    Description

      org.apache.cxf.javascript.JavascriptUtils generates serializer code in JS that surrounds individual serializations with block scope. This is allegedly (according to a code comment) to provide a "block for local variables", but JS does not actually support block scope:

      https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Block_Statement

      Instead, all of these chunks of code run in the same scope. I am unsure as to whether this attempt at keeping a clean scope has any effect on extant code.

      Attachments

        Activity

          People

            Unassigned Unassigned
            timmc Tim McCormack
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: