You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2014/11/17 16:37:33 UTC

[jira] [Created] (SLING-4179) Inconsistent primitive JavaScript types wrapping

Radu Cotescu created SLING-4179:
-----------------------------------

             Summary: Inconsistent primitive JavaScript types wrapping
                 Key: SLING-4179
                 URL: https://issues.apache.org/jira/browse/SLING-4179
             Project: Sling
          Issue Type: Bug
          Components: Scripting
    Affects Versions: Scripting JavaScript 2.0.14
            Reporter: Radu Cotescu


Due to how Java objects are wrapped into JavaScript objects some JavaScript evaluations fail.

For a GET request: {{request.getMethod() === 'GET'}} returns {{false}}, however {{request.getMethod() == 'GET'}} returns {{true}}.

For a request having selectors 'a.b', {{request.getRequestPathInfo().getSelectors().indexOf('b')}} returns -1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)