Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1886

NPE when attempting to access cocoon.request from within a nested JS function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 2.1.8
    • None
    • - Flowscript
    • None

    Description

      ? Confirmed in 2.1.8; probably affects subsequent versions as well
      ? Prioritized as "minor" because it can be worked around in most cases

      This causes an NPE:

        function outer() {
          function inner() {
            var x = cocoon.request;
          }
        }

      java.lang.NullPointerException
              at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_request(FOM_Cocoon.java:574)
              at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.java:200)
              etc...

      Attachments

        Activity

          People

            Unassigned Unassigned
            mlundquist2@comcast.net Mark Lundquist
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: