NPE when attempting to access cocoon.request from within a nested JS function
-----------------------------------------------------------------------------
Key: COCOON-1886
URL: http://issues.apache.org/jira/browse/COCOON-1886
Project: Cocoon
Issue Type: Bug
Components: - Flowscript
Affects Versions: 2.1.8
Reporter: Mark Lundquist
Priority: Minor
• 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...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira