You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Marc DeXeT (JIRA)" <co...@jakarta.apache.org> on 2005/01/23 01:04:17 UTC

[jira] Commented: (JELLY-167) add 'public JellyContext newEmptyJellyContext()' to JellyContext

     [ http://issues.apache.org/jira/browse/JELLY-167?page=comments#action_57953 ]
     
Marc DeXeT commented on JELLY-167:
----------------------------------

Hans Gilde said :
> I'm not in favor of adding this method to JellyContext 
> because it's not used by the core Jelly API.

> If you want to copy a context in a particular way, 
> why not just create a new static method for yourself (outside of the Jelly API):

I'm sorry but JellyContext is frequently updated and theses modifications could have great consequences in any improvements.

This new static method, although not used by core API (yet ?) would guarantee a constant behavior as newJellyContext does. It's the same, insuring all others core features (tag caching, class loading and so on) are inherit BUT the var map.

Yesterday, just do JellyContext myIsolatedContext = new JellyContext() was enough, but now you have to clearVariables and setInherit(true). And tomorrow there would be another change to do the same way.

Rather than subclassing another time JellyContext, in my point of view make sure of an atomic behavior ( as newJellyContext is) could be a little for core and great for a recurrent need.

> add 'public JellyContext newEmptyJellyContext()' to JellyContext
> ----------------------------------------------------------------
>
>          Key: JELLY-167
>          URL: http://issues.apache.org/jira/browse/JELLY-167
>      Project: jelly
>         Type: Wish
>   Components: core / taglib.core
>     Versions: 1.0-beta-5
>     Reporter: Marc DeXeT

>
> method 'public JellyContext newJellyContext()' uses 'public JellyContext(JellyContext parent)'.
> This constructor copies parent properties AND parent variables.
> To create variables quenched context, you have to clear variables or to set inherit to false.
> I wish to have a new method 'public JellyContext newEmptyJellyContext()' which copies all root context properties (as tag caching) but DOESN'T copy variables map. 
> Even if you could do the same with inherit or variable map clearing or other methods, it would be more meaningful to use a assigned method

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org