On Tue, Mar 5, 2019 at 2:12 PM Claude Brisson <cla...@renegat.net.invalid> wrote: > > Oh, you are referring to the recent commit #1854695, "[engine] Invalid > method calls should definitely be logged". > > Strict mode is not concerned here, its purpose is to throw exceptions > that will stop merging whenever an invalid reference or method is > encountered. > > Without strict mode, we were previously getting a debug log for null > references rendering, but nothing so far for invalid methods, that's the > problem this commit is addressing. > > But you are right, there *is* an inconsistency: the null references > message is at the DEBUG loglevel, and the new invalid reference message > is at the WARN level. > > So I'm gonna lower the latter one to DEBUG to be consistent.
Thanks ! Apart from this it looks good, all the XWiki Velocity related unit test I had created for the problems I previous found with Velocity 2.0 are passing. Great job ! > > -- > Claude > > > On 04/03/2019 12:49, Thomas Mortagne wrote: > > Actually it's very clear why it's done like this sorry. > > > > What is really not clear and not really documented in the migration notes > > is why did this became a problem ? I can think of several use cases where > > not existing may be called and then a fallback done depending on the > > version of XWiki > > > > Le lun. 4 mars 2019 à 12:36, Thomas Mortagne <thomas.morta...@xwiki.com> a > > écrit : > > > >> I did not double checked but I don't remember this to be the case in > >> my previous quick tests with Velocity 2.0: I get > >> > >> [WARN] Object 'java.lang.String' does not contain method tyty() at > >> mytemplate[line 1, column 36] > >> > >> warnings despite the fact that I did not modified > >> "runtime.references.strict" default. > >> > >> The warnings I get are coming from > >> > >> http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java?view=markup#l179 > >> while I can see in debug mode that > >> > >> http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ClassUtils.java?view=markup#l220 > >> have the expected behavior (it does not enter the if and the boolean > >> is based on "runtime.references.strict" property). It seems to just be > >> missing a if on strictRef value. > >> > >> Tell me if I should create an issue on > >> https://issues.apache.org/jira/browse/VELOCITY. > >> > >> On Mon, Mar 4, 2019 at 2:47 AM Claude Brisson > >> <cla...@renegat.net.invalid> wrote: > >>> > >>> On 03/03/2019 21:52, Claude Brisson wrote: > >>>>> > >>>>> Is this list complete? > >>>>> http://velocity.apache.org/engine/2.0/configuration.html > >>>> Apart from 2.1 novelties, I'm quite sure, yes. All new ones are > >>>> visible in http://velocity.apache.org/engine/devel/configuration.html > >>> It looks like this one is an orphan and can be removed: > >>> > >>> /** Switch for VM blather: default true. */ > >>> String VM_MESSAGES_ON = "velocimacro.messages.on"; > >>> > >>> But it also appears that "userdirective" is absent from > >>> RuntimeConstants, as well as from the documentation... since a long time. > >>> > >>> > >>> > >> > >> -- > >> Thomas Mortagne > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org > For additional commands, e-mail: dev-h...@velocity.apache.org > -- Thomas Mortagne --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org