On Thu, Nov 10, 2016 at 4:19 AM, Sergiu Dumitriu <sergiu.dumit...@gmail.com> wrote:
> On 11/10/2016 03:01 AM, cbris...@apache.org wrote: > > Author: cbrisson > > Date: Thu Nov 10 08:01:41 2016 > > New Revision: 1769055 > > > > URL: http://svn.apache.org/viewvc?rev=1769055&view=rev > > Log: > > [tools] a tool should either be Serializable or forbid Session scope > > > > Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/ > org/apache/velocity/tools/generic/RenderTool.java > > URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity- > tools-generic/src/main/java/org/apache/velocity/tools/ > generic/RenderTool.java?rev=1769055&r1=1769054&r2=1769055&view=diff > > ============================================================ > ================== > > --- velocity/tools/trunk/velocity-tools-generic/src/main/java/ > org/apache/velocity/tools/generic/RenderTool.java (original) > > +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/ > org/apache/velocity/tools/generic/RenderTool.java Thu Nov 10 08:01:41 2016 > > @@ -31,6 +31,7 @@ import org.apache.velocity.context.Conte > > import org.apache.velocity.tools.Scope; > > import org.apache.velocity.tools.ToolContext; > > import org.apache.velocity.tools.config.DefaultKey; > > +import org.apache.velocity.tools.config.InvalidScope; > > > > /** > > * This tool exposes methods to evaluate the given > > @@ -103,7 +104,9 @@ import org.apache.velocity.tools.config. > > * @author Nathan Bubna > > * @version $Revision$ $Date$ > > */ > > + > > @DefaultKey("render") > > +@InvalidScope(Scope.SESSION) > > Is it intended to have an IN-valid scope? What prevents it to be used in > a session? > > Nothing prevents a user from manually inserting one into their session, but this annotation bans them from configuring VelocityTools to automatically insert fresh RenderTools into each session for them. > > public class RenderTool extends SafeConfig > > { > > /** > > > > -- > Sergiu Dumitriu > http://purl.org/net/sergiu/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org > For additional commands, e-mail: dev-h...@velocity.apache.org > >