You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2017/04/08 22:02:26 UTC

svn commit: r1790718 - in /velocity/site/production: ./ engine/1.7/ engine/2.0/ engine/devel/ tools/devel/

Author: cbrisson
Date: Sat Apr  8 22:02:25 2017
New Revision: 1790718

URL: http://svn.apache.org/viewvc?rev=1790718&view=rev
Log:
Push last changes into production

(some changes are due to a markdown_py upgrade to 2.6.7)


Modified:
    velocity/site/production/engine/1.7/user-guide.html
    velocity/site/production/engine/2.0/changes.html
    velocity/site/production/engine/2.0/configuration.html
    velocity/site/production/engine/2.0/dependencies.html
    velocity/site/production/engine/2.0/developer-guide.html
    velocity/site/production/engine/2.0/upgrading.html
    velocity/site/production/engine/2.0/user-guide.html
    velocity/site/production/engine/2.0/vtl-reference.html
    velocity/site/production/engine/devel/changes.html
    velocity/site/production/engine/devel/configuration.html
    velocity/site/production/engine/devel/dependencies.html
    velocity/site/production/engine/devel/developer-guide.html
    velocity/site/production/engine/devel/upgrading.html
    velocity/site/production/engine/devel/user-guide.html
    velocity/site/production/engine/devel/vtl-reference.html
    velocity/site/production/site-building.html
    velocity/site/production/tools/devel/dependencies.html

Modified: velocity/site/production/engine/1.7/user-guide.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/1.7/user-guide.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/1.7/user-guide.html (original)
+++ velocity/site/production/engine/1.7/user-guide.html Sat Apr  8 22:02:25 2017
@@ -656,7 +656,7 @@ visible. *# This text is outside the com
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Plan</span> <span class="o">=</span> <span class="p">$</span><span class="nv">spindoctor</span><span class="p">.</span><span class="nv">weave</span><span class="p">($</span><span class="nv">web</span><span class="p">)</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> method reference</span><span class="x"></span>
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Number</span> <span class="o">=</span> <span class="m">123</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c">number literal</span><span class="x"></span>
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Say</span> <span class="o">=</span> <span class="o">[</span><span class="s2">&quot;Not&quot;</span><span class="p">,</span> <span class="p">$</span><span class="nv">my</span><span class="p">,</span> <span class="s2">&quot;fault&quot;</span><span class="p">]</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> ArrayList</span><span class="x"></span>
-<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Map</span> <span class="o">=</span> <span class="err">{</span><span class="s2">&quot;banana&quot;</span> <span class="err">:</span> <span class="s2">&quot;good&quot;</span><span class="p">,</span> <span class="s2">&quot;roast beef&quot;</span> <span class="err">:</span> <span class="s2">&quot;bad&quot;</span><span class="err">}</span><span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> Map</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Map</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;banana&quot;</span> <span class="p">:</span> <span class="s2">&quot;good&quot;</span><span class="p">,</span> <span class="s2">&quot;roast beef&quot;</span> <span class="p">:</span> <span class="s2">&quot;bad&quot;</span><span class="p">})</span><span class="x"> </span><span class="cp">##</span><span class="c"> Map</span><span class="x"></span>
 </pre></div>
 
 

Modified: velocity/site/production/engine/2.0/changes.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/changes.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/changes.html (original)
+++ velocity/site/production/engine/2.0/changes.html Sat Apr  8 22:02:25 2017
@@ -317,6 +317,20 @@ h2:hover > .headerlink, h3:hover > .head
         <td>
           <img src="images/add.png"/>
         </td>
+        <td> Allow expressions inside []: <code> $foo[$bar + 1] </code>  . </td>
+        <td>cbrisson</td>
+      </tr>
+      <tr>
+        <td>
+          <img src="images/add.png"/>
+        </td>
+        <td> New strategy for reference boolean evaluation: <ol>  <li> return false for a null object </li>  <li> return its value for a Boolean object, or the result of the <code> getAsBoolean() </code> method if it exists. </li>  <li> if <code> directive.if.emptycheck </code> is false (true by default), stop here and return true. </li>  <li> check for emptiness: <ul>  <li> return whether an array is empty. </li>  <li> return whether <code> isEmpty() </code> is false (covers String and all Collection classes). </li>  <li> return whether <code> length() </code> is zero (covers CharSequence classes other than String). </li>  <li> returns whether <code> size() </code> is zero. </li>  <li> return whether a Number <b> strictly </b> equals zero. </li>  </ul>  </li>  <li> check for emptiness after explicit conversion methods: <ul>  <li> return whether the result of <code> getAsString() </code> is empty (and false for a null result) if it exists. </li>  <li> return whether the result of <c
 ode> getAsNumber() </code>  <b> strictly </b> equals zero (and false for a null result) if it exists. </li>  </ul>  </li>  </ol>  . </td>
+        <td>cbrisson</td>
+      </tr>
+      <tr>
+        <td>
+          <img src="images/add.png"/>
+        </td>
         <td> Reviewed event handling API: <ul>  <li> added a Context argument for all events </li>  <li> got rid of the Executor pattern ; event handlers are directly called by the cartridge </li>  </ul>  . </td>
         <td>cbrisson</td>
       </tr>
@@ -507,7 +521,7 @@ h2:hover > .headerlink, h3:hover > .head
           <img src="images/fix.png"/>
         </td>
         <td> Fix regression: #set&lt;tab&gt;left-paren no longer valid grammar Patch from Mike Kienenberger applied + added test . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-863">VELOCITY-863</a>. Thanks to Mike Kienenberger.</td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
@@ -528,28 +542,28 @@ h2:hover > .headerlink, h3:hover > .head
           <img src="images/fix.png"/>
         </td>
         <td> Vulnerability in dependency: commons-collections: 3.2.1 . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-869">VELOCITY-869</a>. </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
           <img src="images/fix.png"/>
         </td>
         <td> Exception displayed when trying to loop over an Iterable private class . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-870">VELOCITY-870</a>. </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
           <img src="images/fix.png"/>
         </td>
         <td> #foreach should work over any Iterable class . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-871">VELOCITY-871</a>. </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
           <img src="images/fix.png"/>
         </td>
         <td> Catch exceptions raised during chainable uberspector initialization . </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>

Modified: velocity/site/production/engine/2.0/configuration.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/configuration.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/configuration.html (original)
+++ velocity/site/production/engine/2.0/configuration.html Sat Apr  8 22:02:25 2017
@@ -302,9 +302,22 @@ h2:hover > .headerlink, h3:hover > .head
 <p>Tells #foreach to simply skip rendering when the object it is iterating over is not or cannot produce a valid Iterator.</p>
 </blockquote>
 <h3 id="if-directive">#if() Directive<a class="headerlink" href="#if-directive" title="Permanent link">&para;</a></h3>
-<p><strong><code>directive.if.tostring.nullcheck = true</code></strong></p>
+<p><strong><code>directive.if.emptycheck = true</code></strong></p>
 <blockquote>
-<p>Default behavior is to check return value of toString() and treat an object with toString() that returns null as null. If all objects have toString() methods that never return null, this check is unnecessary and can be disabled to gain performance. In Velocity 1.5, no such null check was performed.</p>
+<p>When evaluating if a reference resolves to <code>true</code> or <code>false</code> in a boolean context, the engine first checks if its value is null, if it is a Boolean or if it has a getAsBoolean() method. Then, if none of this applies, the behavior depends upon this configuration flag:</p>
+<ul>
+<li>if <code>directive.if.emptycheck</code> is <code>false</code>, no further check is performed and the object resolves to <code>true</code>.</li>
+<li>if <code>directive.if.emptycheck</code> is <code>true</code>, the object is check for emptiness and zero value:<ul>
+<li>return whether an array is empty.</li>
+<li>return whether isEmpty() is false (covers String and all Collection classes).</li>
+<li>return whether length() is zero (covers CharSequence classes other than String).</li>
+<li>returns whether size() is zero (covers all Collections classes).</li>
+<li>return whether a Number <em>strictly</em> equals zero.</li>
+<li>return whether the result of getAsString() is empty (and false for a null result) if it exists.</li>
+<li>return whether the result of getAsNumber() <em>strictly</em> equals zero (and false for a null result) if it exists. </li>
+</ul>
+</li>
+</ul>
 </blockquote>
 <h3 id="set-directive">#set() Directive<a class="headerlink" href="#set-directive" title="Permanent link">&para;</a></h3>
 <p><strong><code>directive.set.null.allowed = false</code></strong></p>

Modified: velocity/site/production/engine/2.0/dependencies.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/dependencies.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/dependencies.html (original)
+++ velocity/site/production/engine/2.0/dependencies.html Sat Apr  8 22:02:25 2017
@@ -240,7 +240,7 @@ h2:hover > .headerlink, h3:hover > .head
 <tbody>
 <tr>
 <td>slf4j-api</td>
-<td>1.7.21</td>
+<td>1.7.25</td>
 <td>Yes</td>
 <td>Yes</td>
 <td>Yes</td>
@@ -280,7 +280,7 @@ h2:hover > .headerlink, h3:hover > .head
 </tr>
 <tr>
 <td>slf4j-simple</td>
-<td>1.7.21</td>
+<td>1.7.25</td>
 <td>No</td>
 <td>Yes</td>
 <td>No</td>

Modified: velocity/site/production/engine/2.0/developer-guide.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/developer-guide.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/developer-guide.html (original)
+++ velocity/site/production/engine/2.0/developer-guide.html Sat Apr  8 22:02:25 2017
@@ -729,7 +729,7 @@ see the Javadoc API documentation.</p>
 
     <span class="o">/*</span> <span class="n">lets</span> <span class="n">make</span> <span class="n">a</span> <span class="n">Context</span> <span class="ow">and</span> <span class="n">put</span> <span class="n">data</span> <span class="n">into</span> <span class="n">it</span> <span class="o">*/</span>
 
-<span class="o">...</span>
+    <span class="o">...</span>
 </pre></div>
 
 
@@ -1276,6 +1276,7 @@ eventhandler.escape.sql.match = /sql.*/
       <th>Long</th>
       <th>Float</th>
       <th>Double</th>
+      <th>Number</th>
       <th>String</th>
       <th>Object</th>
       <th>null</th>
@@ -1291,6 +1292,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1307,6 +1309,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
+      <td><span class="none">none</span></td>
     </tr>
     <tr>
       <th>byte</th>
@@ -1317,7 +1320,8 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
-      <td><span class="none">none</span></td>
+      <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
@@ -1333,6 +1337,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1347,6 +1352,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1361,6 +1367,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1375,6 +1382,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="implicit">implicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1389,6 +1397,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="implicit">implicit</span></td>
       <td><span class="implicit">implicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1403,6 +1412,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1418,6 +1428,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
+      <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
     <tr>
@@ -1431,6 +1442,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1445,6 +1457,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1459,6 +1472,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1473,6 +1487,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1487,6 +1502,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="strict">strict</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1501,6 +1517,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1514,6 +1531,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
+      <td><span class="strict">strict</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
@@ -1528,6 +1546,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="strict">strict</span></td>
@@ -1537,6 +1556,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
+      <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>

Modified: velocity/site/production/engine/2.0/upgrading.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/upgrading.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/upgrading.html (original)
+++ velocity/site/production/engine/2.0/upgrading.html Sat Apr  8 22:02:25 2017
@@ -251,6 +251,7 @@ space.gobbling = bc
 <li>Initialization methods in Velocity and VelocityEngine taking an ExtendedProperties have been removed (but <code>setProperties(Properties)</code> methods are still here). All occurences of the org.apache.commons.collections.ExtendedProperties class in the runtime internal initialization API have been replaced by org.apache.velocity.util.ExtProperties.</li>
 <li>the macros are now using a 'call by sharing' convention (which means that all arguments are evaluated once at start, and that the macro receives a copy of the reference to each argument).</li>
 <li>the <code>UberspectLoggable</code> interface has been removed.</li>
+<li>the <code>directive.if.tostring.nullcheck</code> configuration property has been superseded by the <code>directive.if.emptycheck</code> property.</li>
 </ul>
 <h3 id="vtl-changes">VTL Changes:<a class="headerlink" href="#vtl-changes" title="Permanent link">&para;</a></h3>
 <ul>
@@ -263,7 +264,7 @@ space.gobbling = bc
 <ul>
 <li>Velocity now requires a JDK version of 1.7 or higher.</li>
 <li>commons-collections and commons-logging aren't needed any more at runtime.</li>
-<li>there's a new runtime dependency, slf4j-api 1.7.12.</li>
+<li>there's a new runtime dependency, slf4j-api 1.7.25.</li>
 <li>you'll need an <a href="dependencies.html">SLF4J binding</a>.</li>
 <li>commons-lang has to be upgraded to 3.5.</li>
 </ul>

Modified: velocity/site/production/engine/2.0/user-guide.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/user-guide.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/user-guide.html (original)
+++ velocity/site/production/engine/2.0/user-guide.html Sat Apr  8 22:02:25 2017
@@ -657,7 +657,7 @@ visible. *# This text is outside the com
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Plan</span> <span class="o">=</span> <span class="p">$</span><span class="nv">spindoctor</span><span class="p">.</span><span class="nv">weave</span><span class="p">($</span><span class="nv">web</span><span class="p">)</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> method reference</span><span class="x"></span>
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Number</span> <span class="o">=</span> <span class="m">123</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c">number literal</span><span class="x"></span>
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Say</span> <span class="o">=</span> <span class="o">[</span><span class="s2">&quot;Not&quot;</span><span class="p">,</span> <span class="p">$</span><span class="nv">my</span><span class="p">,</span> <span class="s2">&quot;fault&quot;</span><span class="p">]</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> ArrayList</span><span class="x"></span>
-<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Map</span> <span class="o">=</span> <span class="err">{</span><span class="s2">&quot;banana&quot;</span> <span class="err">:</span> <span class="s2">&quot;good&quot;</span><span class="p">,</span> <span class="s2">&quot;roast beef&quot;</span> <span class="err">:</span> <span class="s2">&quot;bad&quot;</span><span class="err">}</span><span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> Map</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Map</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;banana&quot;</span> <span class="p">:</span> <span class="s2">&quot;good&quot;</span><span class="p">,</span> <span class="s2">&quot;roast beef&quot;</span> <span class="p">:</span> <span class="s2">&quot;bad&quot;</span><span class="p">})</span><span class="x"> </span><span class="cp">##</span><span class="c"> Map</span><span class="x"></span>
 </pre></div>
 
 
@@ -774,12 +774,14 @@ The result of the second query is bill
 </pre></div>
 
 
-<p>The variable <em>$foo</em> is evaluated to determine whether it is true, which will happen under one of three circumstances:</p>
+<p>The variable <em>$foo</em> is evaluated to determine whether it is true, which will happen under one of those circumstances:</p>
 <ul>
 <li><em>$foo</em> is a boolean (true/false) which has a true value</li>
 <li><em>$foo</em> is a string or a collection which is not null <strong>and</strong> not empty</li>
-<li><em>$foo</em> is an object (other than a string or a collection) which is not null</li>
+<li><em>$foo</em> is a number which equals to zero</li>
+<li><em>$foo</em> is an object (other than a string, a number or a collection) which is not null</li>
 </ul>
+<p>(please note that this is the default behavior, but Velocity can be configured to <a href="configuration.html#if-directive">skip all checks beyond boolean and nullity ones</a>).</p>
 <p>Remember that the Velocity context only contains Objects, so when we say 'boolean', it will be represented as a Boolean (the class).  This is true even for methods that return <code>boolean</code> - the introspection infrastructure will return a <code>Boolean</code> of the same logical value.</p>
 <p>The content between the <em>#if</em> and the <em>#end</em> statements become the output if the evaluation is true. In this case, if <em>$foo</em> is true, the output will be: "Velocity!". Conversely, if <em>$foo</em> has a null value, or if it is a boolean false, the statement evaluates as false, and there is no output.</p>
 <p>An <em>#elseif</em> or <em>#else</em> element can be used with an <em>#if</em> element. Note that the Velocity Templating Engine will stop at the first expression that is found to be true. In the following example, suppose that <em>$foo</em> has a value of 15 and <em>$bar</em> has a value of 6.</p>

Modified: velocity/site/production/engine/2.0/vtl-reference.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/2.0/vtl-reference.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/2.0/vtl-reference.html (original)
+++ velocity/site/production/engine/2.0/vtl-reference.html Sat Apr  8 22:02:25 2017
@@ -289,8 +289,24 @@ h2:hover > .headerlink, h3:hover > .head
 <p><strong>#</strong> [ <strong>{</strong> ] <strong>if</strong> [ <strong>}</strong> ] <strong>(</strong> [condition] <strong>)</strong> [output] [<strong>#</strong> [ <strong>{</strong> ] <strong>elseif</strong> [ <strong>}</strong> ] <strong>( </strong>[condition] <strong>)</strong> [output] ]* [<strong>#</strong> [ <strong>{</strong> ] <strong>else</strong> [ <strong>}</strong> ]  [output] ] <strong>#</strong> [ <strong>{</strong> ] <strong>end</strong> [ <strong>}</strong> ]</p>
 <p>Usage:</p>
 <ul>
-<li><em>condition</em> - If a boolean, considered true if it has a true false; if not a boolean, considered true if not null.</li>
-<li><em>output</em> - May contain VTL.</li>
+<li>
+<p><em>condition</em> - Expression to evaluate. When tis result is null, evaluate to false. Otherwise, check for conversion towards Boolean and non-emptiness as follow:</p>
+<ul>
+<li>return its value for a Boolean object, or the result of the getAsBoolean() method if it exists.</li>
+<li>if <code>directive.if.emptycheck</code> = <code>false</code> (<code>true</code> by default), stop here and consider it true.</li>
+<li>return whether an array is empty.</li>
+<li>return whether isEmpty() is false (covers String and all Collection classes).</li>
+<li>return whether length() is zero (covers CharSequence classes other than String).</li>
+<li>returns whether size() is zero (covers all Collection classes).</li>
+<li>return whether a Number <em>strictly</em> equals zero.</li>
+<li>return whether the result of getAsString() is empty (and false for a null result) if it exists.</li>
+<li>return whether the result of getAsNumber() <em>strictly</em> equals zero (and false for a null result) if it exists.</li>
+<li>consider the condition is <code>true</code></li>
+</ul>
+</li>
+<li>
+<p><em>output</em> - May contain VTL.</p>
+</li>
 </ul>
 <p>Examples (showing different operators):</p>
 <table class="table">

Modified: velocity/site/production/engine/devel/changes.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/changes.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/devel/changes.html (original)
+++ velocity/site/production/engine/devel/changes.html Sat Apr  8 22:02:25 2017
@@ -317,6 +317,20 @@ h2:hover > .headerlink, h3:hover > .head
         <td>
           <img src="images/add.png"/>
         </td>
+        <td> Allow expressions inside []: <code> $foo[$bar + 1] </code>  . </td>
+        <td>cbrisson</td>
+      </tr>
+      <tr>
+        <td>
+          <img src="images/add.png"/>
+        </td>
+        <td> New strategy for reference boolean evaluation: <ol>  <li> return false for a null object </li>  <li> return its value for a Boolean object, or the result of the <code> getAsBoolean() </code> method if it exists. </li>  <li> if <code> directive.if.emptycheck </code> is false (true by default), stop here and return true. </li>  <li> check for emptiness: <ul>  <li> return whether an array is empty. </li>  <li> return whether <code> isEmpty() </code> is false (covers String and all Collection classes). </li>  <li> return whether <code> length() </code> is zero (covers CharSequence classes other than String). </li>  <li> returns whether <code> size() </code> is zero. </li>  <li> return whether a Number <b> strictly </b> equals zero. </li>  </ul>  </li>  <li> check for emptiness after explicit conversion methods: <ul>  <li> return whether the result of <code> getAsString() </code> is empty (and false for a null result) if it exists. </li>  <li> return whether the result of <c
 ode> getAsNumber() </code>  <b> strictly </b> equals zero (and false for a null result) if it exists. </li>  </ul>  </li>  </ol>  . </td>
+        <td>cbrisson</td>
+      </tr>
+      <tr>
+        <td>
+          <img src="images/add.png"/>
+        </td>
         <td> Reviewed event handling API: <ul>  <li> added a Context argument for all events </li>  <li> got rid of the Executor pattern ; event handlers are directly called by the cartridge </li>  </ul>  . </td>
         <td>cbrisson</td>
       </tr>
@@ -507,7 +521,7 @@ h2:hover > .headerlink, h3:hover > .head
           <img src="images/fix.png"/>
         </td>
         <td> Fix regression: #set&lt;tab&gt;left-paren no longer valid grammar Patch from Mike Kienenberger applied + added test . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-863">VELOCITY-863</a>. Thanks to Mike Kienenberger.</td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
@@ -528,28 +542,28 @@ h2:hover > .headerlink, h3:hover > .head
           <img src="images/fix.png"/>
         </td>
         <td> Vulnerability in dependency: commons-collections: 3.2.1 . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-869">VELOCITY-869</a>. </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
           <img src="images/fix.png"/>
         </td>
         <td> Exception displayed when trying to loop over an Iterable private class . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-870">VELOCITY-870</a>. </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
           <img src="images/fix.png"/>
         </td>
         <td> #foreach should work over any Iterable class . Fixes <a href="https://issues.apache.org/jira/browse/VELOCITY-871">VELOCITY-871</a>. </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>
           <img src="images/fix.png"/>
         </td>
         <td> Catch exceptions raised during chainable uberspector initialization . </td>
-        <td>sdimitriu</td>
+        <td>sdumitriu</td>
       </tr>
       <tr>
         <td>

Modified: velocity/site/production/engine/devel/configuration.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/configuration.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/devel/configuration.html (original)
+++ velocity/site/production/engine/devel/configuration.html Sat Apr  8 22:02:25 2017
@@ -302,9 +302,22 @@ h2:hover > .headerlink, h3:hover > .head
 <p>Tells #foreach to simply skip rendering when the object it is iterating over is not or cannot produce a valid Iterator.</p>
 </blockquote>
 <h3 id="if-directive">#if() Directive<a class="headerlink" href="#if-directive" title="Permanent link">&para;</a></h3>
-<p><strong><code>directive.if.tostring.nullcheck = true</code></strong></p>
+<p><strong><code>directive.if.emptycheck = true</code></strong></p>
 <blockquote>
-<p>Default behavior is to check return value of toString() and treat an object with toString() that returns null as null. If all objects have toString() methods that never return null, this check is unnecessary and can be disabled to gain performance. In Velocity 1.5, no such null check was performed.</p>
+<p>When evaluating if a reference resolves to <code>true</code> or <code>false</code> in a boolean context, the engine first checks if its value is null, if it is a Boolean or if it has a getAsBoolean() method. Then, if none of this applies, the behavior depends upon this configuration flag:</p>
+<ul>
+<li>if <code>directive.if.emptycheck</code> is <code>false</code>, no further check is performed and the object resolves to <code>true</code>.</li>
+<li>if <code>directive.if.emptycheck</code> is <code>true</code>, the object is check for emptiness and zero value:<ul>
+<li>return whether an array is empty.</li>
+<li>return whether isEmpty() is false (covers String and all Collection classes).</li>
+<li>return whether length() is zero (covers CharSequence classes other than String).</li>
+<li>returns whether size() is zero (covers all Collections classes).</li>
+<li>return whether a Number <em>strictly</em> equals zero.</li>
+<li>return whether the result of getAsString() is empty (and false for a null result) if it exists.</li>
+<li>return whether the result of getAsNumber() <em>strictly</em> equals zero (and false for a null result) if it exists. </li>
+</ul>
+</li>
+</ul>
 </blockquote>
 <h3 id="set-directive">#set() Directive<a class="headerlink" href="#set-directive" title="Permanent link">&para;</a></h3>
 <p><strong><code>directive.set.null.allowed = false</code></strong></p>

Modified: velocity/site/production/engine/devel/dependencies.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/dependencies.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/devel/dependencies.html (original)
+++ velocity/site/production/engine/devel/dependencies.html Sat Apr  8 22:02:25 2017
@@ -240,7 +240,7 @@ h2:hover > .headerlink, h3:hover > .head
 <tbody>
 <tr>
 <td>slf4j-api</td>
-<td>1.7.21</td>
+<td>1.7.25</td>
 <td>Yes</td>
 <td>Yes</td>
 <td>Yes</td>
@@ -280,7 +280,7 @@ h2:hover > .headerlink, h3:hover > .head
 </tr>
 <tr>
 <td>slf4j-simple</td>
-<td>1.7.21</td>
+<td>1.7.25</td>
 <td>No</td>
 <td>Yes</td>
 <td>No</td>

Modified: velocity/site/production/engine/devel/developer-guide.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/developer-guide.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/devel/developer-guide.html (original)
+++ velocity/site/production/engine/devel/developer-guide.html Sat Apr  8 22:02:25 2017
@@ -1276,6 +1276,7 @@ eventhandler.escape.sql.match = /sql.*/
       <th>Long</th>
       <th>Float</th>
       <th>Double</th>
+      <th>Number</th>
       <th>String</th>
       <th>Object</th>
       <th>null</th>
@@ -1291,6 +1292,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1307,6 +1309,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
+      <td><span class="none">none</span></td>
     </tr>
     <tr>
       <th>byte</th>
@@ -1317,7 +1320,8 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
-      <td><span class="none">none</span></td>
+      <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
@@ -1333,6 +1337,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1347,6 +1352,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1361,6 +1367,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1375,6 +1382,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="implicit">implicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1389,6 +1397,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="implicit">implicit</span></td>
       <td><span class="implicit">implicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
     </tr>
@@ -1403,6 +1412,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1418,6 +1428,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
+      <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
     <tr>
@@ -1431,6 +1442,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1445,6 +1457,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1459,6 +1472,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1473,6 +1487,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1487,6 +1502,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="strict">strict</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1501,6 +1517,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
     </tr>
@@ -1514,6 +1531,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
+      <td><span class="strict">strict</span></td>
       <td><span class="none">none</span></td>
       <td><span class="none">none</span></td>
       <td><span class="strict">strict</span></td>
@@ -1528,6 +1546,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="explicit">explicit</span></td>
+      <td><span class="explicit">explicit</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="explicit">explicit</span></td>
       <td><span class="strict">strict</span></td>
@@ -1537,6 +1556,7 @@ eventhandler.escape.sql.match = /sql.*/
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
+      <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>
       <td><span class="strict">strict</span></td>

Modified: velocity/site/production/engine/devel/upgrading.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/upgrading.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/devel/upgrading.html (original)
+++ velocity/site/production/engine/devel/upgrading.html Sat Apr  8 22:02:25 2017
@@ -251,6 +251,7 @@ space.gobbling = bc
 <li>Initialization methods in Velocity and VelocityEngine taking an ExtendedProperties have been removed (but <code>setProperties(Properties)</code> methods are still here). All occurences of the org.apache.commons.collections.ExtendedProperties class in the runtime internal initialization API have been replaced by org.apache.velocity.util.ExtProperties.</li>
 <li>the macros are now using a 'call by sharing' convention (which means that all arguments are evaluated once at start, and that the macro receives a copy of the reference to each argument).</li>
 <li>the <code>UberspectLoggable</code> interface has been removed.</li>
+<li>the <code>directive.if.tostring.nullcheck</code> configuration property has been superseded by the <code>directive.if.emptycheck</code> property.</li>
 </ul>
 <h3 id="vtl-changes">VTL Changes:<a class="headerlink" href="#vtl-changes" title="Permanent link">&para;</a></h3>
 <ul>
@@ -263,7 +264,7 @@ space.gobbling = bc
 <ul>
 <li>Velocity now requires a JDK version of 1.7 or higher.</li>
 <li>commons-collections and commons-logging aren't needed any more at runtime.</li>
-<li>there's a new runtime dependency, slf4j-api 1.7.12.</li>
+<li>there's a new runtime dependency, slf4j-api 1.7.25.</li>
 <li>you'll need an <a href="dependencies.html">SLF4J binding</a>.</li>
 <li>commons-lang has to be upgraded to 3.5.</li>
 </ul>

Modified: velocity/site/production/engine/devel/user-guide.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/user-guide.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/devel/user-guide.html (original)
+++ velocity/site/production/engine/devel/user-guide.html Sat Apr  8 22:02:25 2017
@@ -657,7 +657,7 @@ visible. *# This text is outside the com
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Plan</span> <span class="o">=</span> <span class="p">$</span><span class="nv">spindoctor</span><span class="p">.</span><span class="nv">weave</span><span class="p">($</span><span class="nv">web</span><span class="p">)</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> method reference</span><span class="x"></span>
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Number</span> <span class="o">=</span> <span class="m">123</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c">number literal</span><span class="x"></span>
 <span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Say</span> <span class="o">=</span> <span class="o">[</span><span class="s2">&quot;Not&quot;</span><span class="p">,</span> <span class="p">$</span><span class="nv">my</span><span class="p">,</span> <span class="s2">&quot;fault&quot;</span><span class="p">]</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> ArrayList</span><span class="x"></span>
-<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Map</span> <span class="o">=</span> <span class="err">{</span><span class="s2">&quot;banana&quot;</span> <span class="err">:</span> <span class="s2">&quot;good&quot;</span><span class="p">,</span> <span class="s2">&quot;roast beef&quot;</span> <span class="err">:</span> <span class="s2">&quot;bad&quot;</span><span class="err">}</span><span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> Map</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">monkey</span><span class="p">.</span><span class="nv">Map</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;banana&quot;</span> <span class="p">:</span> <span class="s2">&quot;good&quot;</span><span class="p">,</span> <span class="s2">&quot;roast beef&quot;</span> <span class="p">:</span> <span class="s2">&quot;bad&quot;</span><span class="p">})</span><span class="x"> </span><span class="cp">##</span><span class="c"> Map</span><span class="x"></span>
 </pre></div>
 
 
@@ -774,12 +774,14 @@ The result of the second query is bill
 </pre></div>
 
 
-<p>The variable <em>$foo</em> is evaluated to determine whether it is true, which will happen under one of three circumstances:</p>
+<p>The variable <em>$foo</em> is evaluated to determine whether it is true, which will happen under one of those circumstances:</p>
 <ul>
 <li><em>$foo</em> is a boolean (true/false) which has a true value</li>
 <li><em>$foo</em> is a string or a collection which is not null <strong>and</strong> not empty</li>
-<li><em>$foo</em> is an object (other than a string or a collection) which is not null</li>
+<li><em>$foo</em> is a number which equals to zero</li>
+<li><em>$foo</em> is an object (other than a string, a number or a collection) which is not null</li>
 </ul>
+<p>(please note that this is the default behavior, but Velocity can be configured to <a href="configuration.html#if-directive">skip all checks beyond boolean and nullity ones</a>).</p>
 <p>Remember that the Velocity context only contains Objects, so when we say 'boolean', it will be represented as a Boolean (the class).  This is true even for methods that return <code>boolean</code> - the introspection infrastructure will return a <code>Boolean</code> of the same logical value.</p>
 <p>The content between the <em>#if</em> and the <em>#end</em> statements become the output if the evaluation is true. In this case, if <em>$foo</em> is true, the output will be: "Velocity!". Conversely, if <em>$foo</em> has a null value, or if it is a boolean false, the statement evaluates as false, and there is no output.</p>
 <p>An <em>#elseif</em> or <em>#else</em> element can be used with an <em>#if</em> element. Note that the Velocity Templating Engine will stop at the first expression that is found to be true. In the following example, suppose that <em>$foo</em> has a value of 15 and <em>$bar</em> has a value of 6.</p>

Modified: velocity/site/production/engine/devel/vtl-reference.html
URL: http://svn.apache.org/viewvc/velocity/site/production/engine/devel/vtl-reference.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/engine/devel/vtl-reference.html (original)
+++ velocity/site/production/engine/devel/vtl-reference.html Sat Apr  8 22:02:25 2017
@@ -289,8 +289,24 @@ h2:hover > .headerlink, h3:hover > .head
 <p><strong>#</strong> [ <strong>{</strong> ] <strong>if</strong> [ <strong>}</strong> ] <strong>(</strong> [condition] <strong>)</strong> [output] [<strong>#</strong> [ <strong>{</strong> ] <strong>elseif</strong> [ <strong>}</strong> ] <strong>( </strong>[condition] <strong>)</strong> [output] ]* [<strong>#</strong> [ <strong>{</strong> ] <strong>else</strong> [ <strong>}</strong> ]  [output] ] <strong>#</strong> [ <strong>{</strong> ] <strong>end</strong> [ <strong>}</strong> ]</p>
 <p>Usage:</p>
 <ul>
-<li><em>condition</em> - If a boolean, considered true if it has a true false; if not a boolean, considered true if not null.</li>
-<li><em>output</em> - May contain VTL.</li>
+<li>
+<p><em>condition</em> - Expression to evaluate. When tis result is null, evaluate to false. Otherwise, check for conversion towards Boolean and non-emptiness as follow:</p>
+<ul>
+<li>return its value for a Boolean object, or the result of the getAsBoolean() method if it exists.</li>
+<li>if <code>directive.if.emptycheck</code> = <code>false</code> (<code>true</code> by default), stop here and consider it true.</li>
+<li>return whether an array is empty.</li>
+<li>return whether isEmpty() is false (covers String and all Collection classes).</li>
+<li>return whether length() is zero (covers CharSequence classes other than String).</li>
+<li>returns whether size() is zero (covers all Collection classes).</li>
+<li>return whether a Number <em>strictly</em> equals zero.</li>
+<li>return whether the result of getAsString() is empty (and false for a null result) if it exists.</li>
+<li>return whether the result of getAsNumber() <em>strictly</em> equals zero (and false for a null result) if it exists.</li>
+<li>consider the condition is <code>true</code></li>
+</ul>
+</li>
+<li>
+<p><em>output</em> - May contain VTL.</p>
+</li>
 </ul>
 <p>Examples (showing different operators):</p>
 <table class="table">

Modified: velocity/site/production/site-building.html
URL: http://svn.apache.org/viewvc/velocity/site/production/site-building.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/site-building.html (original)
+++ velocity/site/production/site-building.html Sat Apr  8 22:02:25 2017
@@ -274,17 +274,17 @@ h2:hover > .headerlink, h3:hover > .head
 <span class="nv">VELOCITY</span><span class="o">=</span>~/projects/velocity
 
 <span class="k">if</span> <span class="o">[[</span> <span class="sb">`</span>pidof markdownd.py<span class="sb">`</span> <span class="o">==</span> <span class="s2">&quot;&quot;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
-   <span class="nv">$C</span>MS/build/markdownd.py
+   <span class="nv">$CMS</span>/build/markdownd.py
 <span class="k">fi</span>
 
-find $VELOCITY/site/cms/trunk/ -name <span class="s2">&quot;*~&quot;</span> <span class="p">|</span> xargs rm -v
-rm -rf $VELOCITY/site/target
+find <span class="nv">$VELOCITY</span>/site/cms/trunk/ -name <span class="s2">&quot;*~&quot;</span> <span class="p">|</span> xargs rm -v
+rm -rf <span class="nv">$VELOCITY</span>/site/target
 
-<span class="nv">$C</span>MS/build/build_site.pl --source-base $VELOCITY/site/cms/trunk --target-base $VELOCITY/site/target
-cp -r $VELOCITY/site/target/content/* $VELOCITY/site/production/
-cp $VELOCITY/site/target/content/.htaccess $VELOCITY/site/production/
+<span class="nv">$CMS</span>/build/build_site.pl --source-base <span class="nv">$VELOCITY</span>/site/cms/trunk --target-base <span class="nv">$VELOCITY</span>/site/target
+cp -r <span class="nv">$VELOCITY</span>/site/target/content/* <span class="nv">$VELOCITY</span>/site/production/
+cp <span class="nv">$VELOCITY</span>/site/target/content/.htaccess <span class="nv">$VELOCITY</span>/site/production/
 
-svn status $VELOCITY/site/production/
+svn status <span class="nv">$VELOCITY</span>/site/production/
 </pre></div>
 </td></tr></table>
 

Modified: velocity/site/production/tools/devel/dependencies.html
URL: http://svn.apache.org/viewvc/velocity/site/production/tools/devel/dependencies.html?rev=1790718&r1=1790717&r2=1790718&view=diff
==============================================================================
--- velocity/site/production/tools/devel/dependencies.html (original)
+++ velocity/site/production/tools/devel/dependencies.html Sat Apr  8 22:02:25 2017
@@ -231,7 +231,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td>Yes</td>
 <td>Yes</td>
 <td>Yes</td>
-<td>Required for core infrastructure, <a href="apidocs/org/apache/velocity/tools/generic/MathTool.html">MathTool</a> and <a href="apidocs/org/apache/velocity/tools/generic/SortTool.html">SortTool</a></td>
+<td>Required for core infrastructure, <a href="apidocs/org/apache/velocity/tools/generic/MathTool.html">MathTool</a> and <a href="apidocs/org/apache/velocity/tools/generic/DisplayTool.html">DisplayTool</a></td>
 </tr>
 <tr>
 <td>commons-digester</td>
@@ -239,23 +239,7 @@ h2:hover > .headerlink, h3:hover > .head
 <td>Yes</td>
 <td>Yes</td>
 <td>Yes</td>
-<td>Required for <a href="config-xml.html">xml configuration</a></td>
-</tr>
-<tr>
-<td>dom4j</td>
-<td>1.6.1+</td>
-<td>Yes</td>
-<td>No</td>
-<td>Yes</td>
-<td>Required only for <a href="apidocs/org/apache/velocity/tools/generic/XmlTool.html">XmlTool</a></td>
-</tr>
-<tr>
-<td>jaxen</td>
-<td>1.1.6+</td>
-<td>Yes</td>
-<td>No</td>
-<td>Yes</td>
-<td>Required only for <a href="apidocs/org/apache/velocity/tools/generic/XmlTool.html">XmlTool</a> (dom4j dependency)</td>
+<td>Required for <a href="config-xml.html">xml configuration</a> and <a href="apidocs/org/apache/velocity/tools/view/UiDependencyTool.html">UIDependencyTool</a></td>
 </tr>
 <tr>
 <td>junit</td>