Author: nbubna
Date: Wed Sep  3 23:26:27 2008
New Revision: 691881

URL: http://svn.apache.org/viewvc?rev=691881&view=rev
Log:
VELOCITY-560 fix ExtendedProperties example

Modified:
    velocity/engine/trunk/xdocs/docs/developer-guide.xml

Modified: velocity/engine/trunk/xdocs/docs/developer-guide.xml
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/xdocs/docs/developer-guide.xml?rev=691881&r1=691880&r2=691881&view=diff
==============================================================================
--- velocity/engine/trunk/xdocs/docs/developer-guide.xml (original)
+++ velocity/engine/trunk/xdocs/docs/developer-guide.xml Wed Sep  3 23:26:27 
2008
@@ -1220,14 +1220,15 @@
 then add new properties with your objects to the ExtendedProperties object.
 </p>
 
-<source><![CDATA[
-...
+<source><![CDATA[    ...
 
     VelocityEngine velocityEngine = new VelocityEngine();
-    ExtendedProperties eprops = new ExtendedProperties();
-
-    // if you already have a Properties object do this
-    eprops.putAll(props);
+    ExtendedProperties eprops = null;
+    if (props==null) {
+       eprops = new ExtendedProperties();
+    } else {
+       eprops = ExtendedProperties.convertProperties(props);
+    }
 
     // Now set the property with your object instance
     eprops.setProperty("name", object);


Reply via email to