Hello.

I've tried jelly in my in-house tool. It works well.

While Embedding jelly into my tool, 
I noticed that JellyContext.newJellyContext() puts a value to its parameter. 

    public JellyContext newJellyContext(Map newVariables) {
        // XXXX: should allow this new context to
        // XXXX: inherit parent contexts? 
        // XXXX: Or at least publish the parent scope
        // XXXX: as a Map in this new variable scope?
        newVariables.put("parentScope", variables); /*** here ***/
        JellyContext answer = createChildContext();
        answer.setVariables(newVariables);
        return answer;
    }

I prefer keep it remain instead of effect it
like :

    public JellyContext newJellyContext(Map newVariables) {
        JellyContext answer = createChildContext();
                answer.setVariable("parentScope", variables);
        answer.setVariables(newVariables);
        return answer;
    }

Because I often pass the unmodifieable map to the method, 
then cause an exception :

            /* throws UnsupportedOperationException. */
        jellyCtx.newJellyContext( Collections.EMPTY_MAP ); 


I can't find problems that the modification might cause.
Do you have any ideas?

Thank you in advance.

--
MORITA Hajime <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to