Author: cbrisson Date: Wed Jun 20 12:28:19 2018 New Revision: 1833909 URL: http://svn.apache.org/viewvc?rev=1833909&view=rev Log: [tools] Fix javadoc errors (still lots of warnings)
Modified: velocity/tools/trunk/pom.xml velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ClassUtils.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ConversionUtils.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolInfo.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/Toolbox.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolboxFactory.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/Data.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/EasyFactoryConfiguration.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/PropertiesFactoryConfiguration.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfiguration.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfigurationRuleSet.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/Alternator.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ConversionTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportSupport.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonContent.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java velocity/tools/trunk/velocity-tools-view-jsp/pom.xml velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/CookieTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/IncludeTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/JeeConfig.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/LinkTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/PagerTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ParameterTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UiDependencyTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewContextTool.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewImportSupport.java velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappUberspector.java Modified: velocity/tools/trunk/pom.xml URL: http://svn.apache.org/viewvc/velocity/tools/trunk/pom.xml?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/pom.xml (original) +++ velocity/tools/trunk/pom.xml Wed Jun 20 12:28:19 2018 @@ -122,12 +122,20 @@ <artifactId>maven-javadoc-plugin</artifactId> <version>3.0.1</version> <configuration> - <aggregate>true</aggregate> <excludePackageNames>org.apache.velocity.tools.examples</excludePackageNames> <additionalparam>${javadoc.opts}</additionalparam> - <links> - </links> + <detectLinks/> </configuration> + <executions> + <execution> + <id>aggregate</id> + <goals> + <goal>aggregate</goal> + </goals> + <configuration> + </configuration> + </execution> + </executions> </plugin> </plugins> </build> Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ClassUtils.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ClassUtils.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ClassUtils.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ClassUtils.java Wed Jun 20 12:28:19 2018 @@ -83,7 +83,6 @@ public class ClassUtils /** * Load a class with a given name. - * <p/> * It will try to load the class in the following order: * <ul> * <li>From {@link Thread}.currentThread().getContextClassLoader() @@ -136,6 +135,7 @@ public class ClassUtils * * @param name The name of the resources to load * @param caller The instance or {@link Class} calling this method + * @return the list of found resources */ public static List<URL> getResources(String name, Object caller) { @@ -262,7 +262,6 @@ public class ClassUtils /** * Load a given resource. - * <p/> * This method will try to load the resource using the following methods (in order): * <ul> * <li>Thread.currentThread().getContextClassLoader().getResource(name)</li> @@ -274,6 +273,7 @@ public class ClassUtils * * @param name The name of the resource to load * @param caller The instance or {@link Class} calling this method + * @return the found URL, or null if not found */ public static URL getResource(final String name, final Object caller) { @@ -299,11 +299,11 @@ public class ClassUtils /** * This is a convenience method to load a resource as a stream. - * <p/> * The algorithm used to find the resource is given in getResource() * * @param name The name of the resource to load * @param caller The instance or {@link Class} calling this method + * @return the resource input stream or null if not found */ public static InputStream getResourceAsStream(final String name, final Object caller) { @@ -399,6 +399,8 @@ public class ClassUtils /** * Retrieves an Iterator from or creates and Iterator for the specified object. * This method is almost entirely copied from Engine's UberspectImpl class. + * @param obj the target obj + * @return an iterator over the content of obj, or null if not found */ public static Iterator getIterator(Object obj) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ConversionUtils.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ConversionUtils.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ConversionUtils.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ConversionUtils.java Wed Jun 20 12:28:19 2018 @@ -214,6 +214,7 @@ public class ConversionUtils * {@link #toNumber(String,String,Locale)} try to parse it using the * default Locale and format. * @param obj - the object to convert + * @return the converted Number or null if the conversion failed */ public static Number toNumber(Object obj) { @@ -226,6 +227,9 @@ public class ConversionUtils * as the second parameter. If you do so, then it will have * {@link #toNumber(String,String,Locale)} try to parse it using the * default Locale and format. + * @param obj the target object + * @param handleStrings whether to try to convert from a string + * @return the converted Number or null if the conversion failed */ public static Number toNumber(Object obj, boolean handleStrings) { @@ -582,6 +586,7 @@ public class ConversionUtils * or {@link Number}. If it can't do that, it will return {@code null}. * * @param obj - the object to convert + * @return the converted Date, or null if the conversion failed */ public static Date toDate(Object obj) { Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolInfo.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolInfo.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolInfo.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolInfo.java Wed Jun 20 12:28:19 2018 @@ -71,7 +71,7 @@ public class ToolInfo implements java.io /** * Tries to create an instance of the specified Class, then looks for a - * configure(Map<String,Object>) method. + * configure(Map<String,Object>) method. * * @param clazz the java.lang.Class of the tool */ Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/Toolbox.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/Toolbox.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/Toolbox.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/Toolbox.java Wed Jun 20 12:28:19 2018 @@ -187,6 +187,7 @@ public class Toolbox implements java.io. * This will not include the keys for any cached data. Note that inclusion * in this map does NOT mean that all these tools will be available for * all requests, as this map ignores all path restrictions on the tools. + * @return a map of tools classes indexed by key */ public Map<String,Class> getToolClassMap() { @@ -213,6 +214,8 @@ public class Toolbox implements java.io. * Returns a new {@link Toolbox} that is a combination of * this Toolbox with one or more specified {@link Toolbox}es. * Neither this instance nor those specified are modified. + * @param toolboxes Toolboxes to combine + * @return the combined toolbox */ public Toolbox combine(Toolbox... toolboxes) { Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolboxFactory.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolboxFactory.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolboxFactory.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/ToolboxFactory.java Wed Jun 20 12:28:19 2018 @@ -33,6 +33,7 @@ import org.apache.velocity.tools.config. * and is meant to stick around for the life of the application. * </p><p> * It works like this: + * </p> * <ol> * <li>Build up your {@link FactoryConfiguration}(s)</li> * <li>Create a {@link ToolboxFactory} instance</li> @@ -43,7 +44,7 @@ import org.apache.velocity.tools.config. * <li>When you want a tool, get that {@link Toolbox} and * ask it for the tool you want (e.g. <code>toolbox.get("math")</code>).</li> * </ol> - * </p><p> + * <p> * Of course, most users will not have to do any of this * as much of it is handled for them by some combination of * {@link ToolManager} or {@link org.apache.velocity.tools.view.VelocityView} Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java Wed Jun 20 12:28:19 2018 @@ -106,10 +106,9 @@ public class ConfigurationUtils } /** - * Returns a {@link FactoryConfiguration} including all default - * "VelocityView" tools available as well as the default "GenericTools". - * @throws {@link ConfigurationException} if a tools.xml is not found - * at the {@link #VIEW_DEFAULTS_PATH}. + * <p>Returns a {@link FactoryConfiguration} including all default + * "VelocityView" tools available as well as the default "GenericTools".</p> + * @throws ConfigurationException if a tools.xml is not found at the {@link #VIEW_DEFAULTS_PATH}. */ public static FactoryConfiguration getVelocityView() { Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/Data.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/Data.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/Data.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/Data.java Wed Jun 20 12:28:19 2018 @@ -42,7 +42,7 @@ import org.apache.velocity.tools.Convers * and {@link FactoryConfiguration}. In other words, * anything you can do in a {@link Data} configuration, you * can do with a {@link Property}.</p> - * <p>Some features supported here are: + * <p>Some features supported here are:</p> * <ul> * <li>built in {@link Type}s for strings, booleans, numbers, fields * and lists thereof</li> @@ -50,7 +50,6 @@ import org.apache.velocity.tools.Convers * with no explicit type</li> * <li>support for any Commons-BeanUtils {@link Converter} implementation</li> * </ul> - * </p> * * @author Nathan Bubna * @version $Id: Data.java 511959 2007-02-26 19:24:39Z nbubna $ Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/EasyFactoryConfiguration.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/EasyFactoryConfiguration.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/EasyFactoryConfiguration.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/EasyFactoryConfiguration.java Wed Jun 20 12:28:19 2018 @@ -25,7 +25,7 @@ import org.apache.velocity.tools.Toolbox /** * <p>{@link FactoryConfiguration} subclass that simplifies the process of * configuring a {@link ToolboxFactory} in Java without the use of an - * xml or properties configuration file. Below is an example: + * xml or properties configuration file. Below is an example:</p> * * <pre><code> * EasyFactoryConfiguration config = new EasyFactoryConfiguration(); @@ -35,10 +35,10 @@ import org.apache.velocity.tools.Toolbox * config.toolbox(Scope.APPLICATION) * .tool(NumberTool.class).property("locale", Locale.FR); * ToolboxFactory factory = config.createFactory(); - * </code></pre></p> + * </code></pre> * * <p>Doing the above without this class would require the following to - * create an equivalent {@link FactoryConfiguration} in Java: + * create an equivalent {@link FactoryConfiguration} in Java:</p> * * <pre><code> * FactoryConfiguration factoryConfig = new FactoryConfiguration(); @@ -59,10 +59,10 @@ import org.apache.velocity.tools.Toolbox * toolbox.addTool(tool); * factoryConfig.addToolbox(toolbox); * ToolboxFactory factory = factoryConfig.createFactory(); - * </code></pre></p> + * </code></pre> * * <p>Of course, you could directly configure a {@link ToolboxFactory} - * with relatively little effort as well: + * with relatively little effort as well:</p> * * <pre><code> * ToolboxFactory factory = new ToolboxFactory(); @@ -74,7 +74,7 @@ import org.apache.velocity.tools.Toolbox * factory.addToolInfo(Scope.APPLICATION, info); * </code></pre> * - * But this is not reusable. Why does that matter? Well, it doesn't matter + * <p>But this is not reusable. Why does that matter? Well, it doesn't matter * for application developers. But, if another framework wishes to provide * a common VelocityTools configuration for application developers, this may * come in handy. Or it may not. In any case, it was mildly fun to write. :) Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/PropertiesFactoryConfiguration.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/PropertiesFactoryConfiguration.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/PropertiesFactoryConfiguration.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/PropertiesFactoryConfiguration.java Wed Jun 20 12:28:19 2018 @@ -28,13 +28,13 @@ import org.apache.velocity.util.ExtPrope /** * <p> This reads in configuration info formatted as a property * file using {@link org.apache.velocity.util.ExtProperties}.</p> - * <p>Example usage: + * <p>Example usage:</p> * <pre> * FactoryConfiguration cfg = new PropertiesFactoryConfiguration(); * cfg.read("my.properties"); * ToolboxFactory factory = cfg.createFactory(); - * </pre></p> - * <p>This reads in a configuration such as: + * </pre> + * <p>This reads in a configuration such as:</p> * <pre> * tools.toolbox = request,application * tools.property.locale = en_us @@ -54,7 +54,7 @@ import org.apache.velocity.util.ExtPrope * tools.data.debug = false * tools.data.debug.type = boolean * </pre> - * <strong>NOTE</strong>: "property", "data", and "toolbox" are + * <p><strong>NOTE</strong>: "property", "data", and "toolbox" are * reserved words do not use them as tool keys or toolbox scopes.</p> * * @author Nathan Bubna Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfiguration.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfiguration.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfiguration.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfiguration.java Wed Jun 20 12:28:19 2018 @@ -33,12 +33,12 @@ import org.apache.commons.digester3.Rule * passing a new {@link RuleSet} to the {@link #setRuleSet} method. * See the configuration documentation on the main web site for * instructions on the XML format supported by the default rules.</p> - * <p>Example usage: + * <p>Example usage:</p> * <pre> * FactoryConfiguration cfg = new XmlFactoryConfiguration("Dev Tools"); * cfg.read("devtools.xml"); * ToolboxFactory factory = cfg.createFactory(); - * </pre></p> + * </pre> * * @author Nathan Bubna * @version $Id: XmlFactoryConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $ Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfigurationRuleSet.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfigurationRuleSet.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfigurationRuleSet.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/XmlFactoryConfigurationRuleSet.java Wed Jun 20 12:28:19 2018 @@ -29,7 +29,7 @@ import org.xml.sax.Attributes; * Commons-{@link Digester} to process configuration info * formatted as XML. This is the default RuleSet used by * {@link XmlFactoryConfiguration}.</p> - * <p>Here is a short example XML: + * <p>Here is a short example XML:</p> * <pre><code> * <tools> * <data type="number" key="version" value="1.1"/> @@ -49,7 +49,7 @@ import org.xml.sax.Attributes; * <tool class="org.apache.velocity.tools.generic.DateTool"/> * </toolbox> * </tools> - * </code></pre></p> + * </code></pre> * * @author Nathan Bubna * @version $Id: XmlConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $ Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/Alternator.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/Alternator.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/Alternator.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/Alternator.java Wed Jun 20 12:28:19 2018 @@ -24,7 +24,7 @@ import java.util.Collection; /** * Utility class for easily alternating over values in a list. * - * <p><b>Example usage:</b> + * <p><b>Example usage:</b></p> * <pre> * java... * String[] myColors = new String[]{"red", "blue"}; @@ -44,7 +44,7 @@ import java.util.Collection; * 3 is red and groovy * 4 is blue and hip * 5 is red and fly - * </pre></p> + * </pre> * * @since Velocity Tools 1.2 * @version $Id$ Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java Wed Jun 20 12:28:19 2018 @@ -30,7 +30,7 @@ import org.apache.velocity.tools.config. * {@link Alternator}s from varying "list" types or individual * arguments. * - * <p><b>Example Use:</b> + * <p><b>Example Use:</b></p> * <pre> * tools.xml... * <tools> @@ -53,7 +53,7 @@ import org.apache.velocity.tools.config. * Number 3 is red and groovy. I dig groovy numbers. * Number 4 is blue and hip. I dig hip numbers. * Number 5 is red and fly. I dig fly numbers. - * </pre></p> + * </pre> * * @since Velocity Tools 1.2 * @version $Revision$ $Date$ Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java Wed Jun 20 12:28:19 2018 @@ -47,8 +47,6 @@ import org.apache.velocity.tools.config. * for code execution, nor direct access to the actual methods, constructors or fields * of the class being inspected. * </p> - * - * <p> * <pre> * Example tools.xml config: * <tools> @@ -57,7 +55,7 @@ import org.apache.velocity.tools.config. * inspect="com.org.Foo"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * <p> * If no Class to be inspected is specified, the default is java.lang.Object. * </p> Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java Wed Jun 20 12:28:19 2018 @@ -44,13 +44,12 @@ import java.util.Map; * #foreach and the same constraints apply as well as the following. * Every object in the collection must support the set of properties * selected to sort on. Each property which is to be sorted on must - * return one of the follow: + * return one of the follow:</p> * <ul> * <li>Primitive type: e.g. int, char, long etc</li> * <li>Standard Object: e.g. String, Integer, Long etc</li> * <li>Object which implements the Comparable interface.</li> * </ul> - * </p> * * <p>During the sort operation all properties are compared by calling * compareTo() with the exception of Strings for which @@ -61,7 +60,7 @@ import java.util.Map; * The original collection will not be re-ordered; a new list containing * the sorted elements will always be returned.</p> * - * <p>The tool is used as follows: + * <p>The tool is used as follows:</p> * <pre> * Single Property Sort * #foreach($obj in $sorter.sort($objects, "name")) @@ -76,7 +75,7 @@ import java.util.Map; * End * </pre> * - * The sort method takes two parameters, a collection and a property name + * <p>The sort method takes two parameters, a collection and a property name * or an array of property names. The property names and corresponding * methods must conform to java bean standards since commons-beanutils * is used to extract the property values.</p> @@ -101,14 +100,14 @@ import java.util.Map; * in descending order, of course you could have left the :asc off of the * 'Name' property as ascending is always the default.</p> * - * <p><pre> - * Example tools.xml config (if you want to use this with VelocityView): + * <p>Example tools.xml config (if you want to use this with VelocityView):</p> + * <pre> * <tools> * <toolbox scope="application"> * <tool class="org.apache.velocity.tools.generic.SortTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author S. Brett Sutton * @author Nathan Bubna Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java Wed Jun 20 12:28:19 2018 @@ -32,7 +32,7 @@ import org.apache.velocity.tools.Scope; import org.apache.velocity.tools.config.ValidScope; /** - * Tool for comparing {@link java.util.Date} and {@link Calendar} values + * <p>Tool for comparing {@link java.util.Date} and {@link Calendar} values * in Velocity templates. This is a subclass of {@link DateTool} * and thus provides all the functionality of that tool and * augments it with the ability to find the relationship between @@ -42,16 +42,16 @@ import org.apache.velocity.tools.config. * "3 hrs away") or the value of a specific time unit may be requested. * When using the textual representations, you can configure the * tool to use alternate resource bundles and to skip over units - * you do not want to be included. - * <p><pre> + * you do not want to be included.</p> + * <pre> * Example of formatting the "current" date: - * $date.whenIs('2005-07-04') -> 1 year ago - * $date.whenIs('2007-02-15').full -> 1 year 32 weeks 2 days 17 hours 38 minutes 44 seconds 178 milliseconds ago - * $date.whenIs('2007-02-15').days -> -730 - * $date.whenIs($date.calendar) -> now - * $date.whenIs('2005-07-04', '2005-07-04') -> same time - * $date.difference('2005-07-04','2005-07-04') -> 0 milliseconds - * $date.difference('2005-07-04','2007-02-15').abbr -> 1 yr + * $date.whenIs('2005-07-04') -> 1 year ago + * $date.whenIs('2007-02-15').full -> 1 year 32 weeks 2 days 17 hours 38 minutes 44 seconds 178 milliseconds ago + * $date.whenIs('2007-02-15').days -> -730 + * $date.whenIs($date.calendar) -> now + * $date.whenIs('2005-07-04', '2005-07-04') -> same time + * $date.difference('2005-07-04','2005-07-04') -> 0 milliseconds + * $date.difference('2005-07-04','2007-02-15').abbr -> 1 yr * * Example tools.xml config (if you want to use this with VelocityView): * <tools> @@ -61,7 +61,7 @@ import org.apache.velocity.tools.config. * bundle="org.apache.velocity.tools.generic.times"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author Nathan Bubna * @author Chris Townsen Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java Wed Jun 20 12:28:19 2018 @@ -35,8 +35,8 @@ import org.apache.velocity.tools.generic /** * <p>Tool for convenient access to {@link Context} data and * meta-data.</p> - * <p><pre> - * Template example(s): + * <p>Template example(s):</p> + * <pre> * #foreach( $key in $context.keys ) * $key = $context.get($key) * #end @@ -47,7 +47,7 @@ import org.apache.velocity.tools.generic * <tool class="org.apache.velocity.tools.generic.ContextTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * <p>This class is only designed for use as a request-scope tool.</p> * Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ConversionTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ConversionTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ConversionTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ConversionTool.java Wed Jun 20 12:28:19 2018 @@ -34,11 +34,12 @@ import org.apache.velocity.tools.config. /** * <p>Utility class for easy conversion of String values to richer types.</p> - * <p><pre> - * Template example(s): - * $convert.toNumber('12.6') -> 12.6 - * $convert.toInt('12.6') -> 12 - * $convert.toNumbers('12.6,42') -> [12.6, 42] + * <p> + * <p>Template example(s):</p> + * <pre> + * $convert.toNumber('12.6') -> 12.6 + * $convert.toInt('12.6') -> 12 + * $convert.toNumbers('12.6,42') -> [12.6, 42] * * Toolbox configuration: * <tools> @@ -47,7 +48,7 @@ import org.apache.velocity.tools.config. * dateFormat="yyyy-MM-dd"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * <p>This comes in very handy when parsing anything.</p> * @@ -164,7 +165,7 @@ public class ConversionTool extends Loca } /** - * @deprecated use {@link DateTool#getDateFormat()} + * @deprecated use {@link DateTool} getDateFormat() methods * @return date format */ public final String getDateFormat() Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java Wed Jun 20 12:28:19 2018 @@ -37,7 +37,7 @@ import org.apache.velocity.tools.config. * arbitrary {@link Date} and {@link Calendar} objects. Also * the tool can be used to retrieve {@link DateFormat} instances * or make conversions to and from various date types.</p> - * <p>Possible formats include: + * <p>Possible formats include:</p> * <ul> * <li>'short', 'medium', 'long', 'full' (from {@link java.text.DateFormat}, optionally suffixed by '_date' or '_time' to get a date-only or time-only format</li> * <li>'iso' for extended ISO 8601 without time zone (ex: '2016-11-24T10:27:30'), optionally suffixed by '_date' or '_time' to get a date-only or time-only format</li> @@ -45,22 +45,22 @@ import org.apache.velocity.tools.config. * <li>'intl', like 'iso' but with a space separator between date and time (ex: '2016-11-24 10:27:30'), optionally suffixed by '_date' or '_time' to get a date-only or time-only format</li> * <li>'intl_tz', like 'intl' but with the time zone short id suffixed after another space (ex: '2016-11-24 10:27:30 CET'), optionally suffixed by '_time' to get a time-only format ('10:27:30+01:00')</li> * <li>a custom format, as specified in {@link SimpleDateFormat}</li> - * </ul></p> - * <p><pre> - * Example of formatting the "current" date: - * $date -> Oct 19, 2003 9:54:50 PM - * $date.long -> October 19, 2003 9:54:50 PM PDT - * $date.medium_time -> 9:54:50 PM - * $date.full_date -> Sunday, October 19, 2003 - * $date.get('default','short') -> Oct 19, 2003 9:54 PM - * $date.get('yyyy-M-d H:m:s') -> 2003-10-19 21:54:50 - * $date.iso -> 2003-10-19T21:54:50-07:00 - * $date.iso_tz_time -> 21:54:50-07:00 - * $date.intl_tz -> 2003-10-19 21:54:50 CET + * </ul> + * <p>Example of formatting the "current" date:</p> + * <pre> + * $date -> Oct 19, 2003 9:54:50 PM + * $date.long -> October 19, 2003 9:54:50 PM PDT + * $date.medium_time -> 9:54:50 PM + * $date.full_date -> Sunday, October 19, 2003 + * $date.get('default','short') -> Oct 19, 2003 9:54 PM + * $date.get('yyyy-M-d H:m:s') -> 2003-10-19 21:54:50 + * $date.iso -> 2003-10-19T21:54:50-07:00 + * $date.iso_tz_time -> 21:54:50-07:00 + * $date.intl_tz -> 2003-10-19 21:54:50 CET * * Example of formatting an arbitrary date: - * $myDate -> Tue Oct 07 03:14:50 PDT 2003 - * $date.format('medium',$myDate) -> Oct 7, 2003 3:14:50 AM + * $myDate -> Tue Oct 07 03:14:50 PDT 2003 + * $date.format('medium',$myDate) -> Oct 7, 2003 3:14:50 AM * * Example tools.xml config (if you want to use this with VelocityView): * <tools> @@ -69,7 +69,7 @@ import org.apache.velocity.tools.config. * format="yyyy-MM-dd"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * <p>Should you need to use several formats, you can either use explicit formats by means of the <code>toDate(format, date)</code> method, * or you can declare several date tool instances with different formats.</p> @@ -437,11 +437,11 @@ public class DateTool extends FormatConf * If the format fits neither of these patterns, then the output * will be formatted according to the symbols defined by * {@link SimpleDateFormat}. - * + * </p> + * <pre> * Examples: "E, MMMM d" will result in "Tue, July 24" * "EEE, M-d (H:m)" will result in "Tuesday, 7-24 (14:12)" * </pre> - * </p> * * @param format the custom or standard pattern to be used * @param obj the date to format @@ -558,7 +558,7 @@ public class DateTool extends FormatConf * @param locale the {@link Locale} to be used * @param timezone the {@link TimeZone} to be used * @return an instance of {@link DateFormat} - * @see {@link ConversionUtils#getDateFormat(int, int, Locale, TimeZone)} + * @see ConversionUtils#getDateFormat(int,int,Locale,TimeZone) * @since VelocityTools 1.1 */ public DateFormat getDateFormat(String dateStyle, String timeStyle, Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java Wed Jun 20 12:28:19 2018 @@ -64,7 +64,7 @@ import org.apache.velocity.tools.config. * Not Null: not null * Null: -- * - * </pre></p> + * </pre> * * @since VelocityTools 2.0 * @author <a href="s...@somacity.com">Sean Legassick</a> @@ -395,7 +395,7 @@ public class DisplayTool extends LocaleC } /** - * Uses {@link String#format(Locale,String,Object...} to format the specified String + * Uses {@link String#format(Locale,String,Object...)} to format the specified String * with the specified arguments. Please note that the format * required here is quite different from that of * {@link #message(String,Object...)}. Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java Wed Jun 20 12:28:19 2018 @@ -33,60 +33,61 @@ import org.apache.velocity.tools.config. * It provides methods to escape outputs for Velocity, Java, JavaScript, HTML, HTTP, XML and SQL. * Also provides methods to render VTL characters that otherwise needs escaping. * - * <p><pre> - * Example uses: - * $velocity -> Please escape $ and #! - * $esc.velocity($velocity) -> Please escape ${esc.d} and ${esc.h}! + * <p>Example uses:</p> + * <pre> + * $velocity -> Please escape $ and #! + * $esc.velocity($velocity) -> Please escape ${esc.d} and ${esc.h}! * - * $java -> He didn't say, "Stop!" - * $esc.java($java) -> He didn't say, \"Stop!\" + * $java -> He didn't say, "Stop!" + * $esc.java($java) -> He didn't say, \"Stop!\" * - * $javascript -> He didn't say, "Stop!" - * $esc.javascript($javascript) -> He didn\'t say, \"Stop!\" + * $javascript -> He didn't say, "Stop!" + * $esc.javascript($javascript) -> He didn\'t say, \"Stop!\" * - * $html -> "bread" & "butter" - * $esc.html($html) -> &quot;bread&quot; &amp; &quot;butter&quot; + * $html -> "bread" & "butter" + * $esc.html($html) -> &quot;bread&quot; &amp; &quot;butter&quot; * - * $xml -> "bread" & "butter" - * $esc.xml($xml) -> &quot;bread&quot; &amp; &quot;butter&quot; + * $xml -> "bread" & "butter" + * $esc.xml($xml) -> &quot;bread&quot; &amp; &quot;butter&quot; * - * $sql -> McHale's Navy - * $esc.sql($sql) -> McHale''s Navy + * $sql -> McHale's Navy + * $esc.sql($sql) -> McHale''s Navy * - * $url -> hello here & there - * $esc.url($url) -> hello+here+%26+there - * $esc.unurl($esc.url($url)) -> hello here & there + * $url -> hello here & there + * $esc.url($url) -> hello+here+%26+there + * $esc.unurl($esc.url($url)) -> hello here & there * - * $esc.dollar -> $ - * $esc.d -> $ + * $esc.dollar -> $ + * $esc.d -> $ * - * $esc.hash -> # - * $esc.h -> # + * $esc.hash -> # + * $esc.h -> # * - * $esc.backslash -> \ - * $esc.b -> \ + * $esc.backslash -> \ + * $esc.b -> \ * - * $esc.quote -> " - * $esc.q -> " + * $esc.quote -> " + * $esc.q -> " * - * $esc.singleQuote -> ' - * $esc.s -> ' + * $esc.singleQuote -> ' + * $esc.s -> ' * - * $esc.newline -> + * $esc.newline -> * - * $esc.n -> + * $esc.n -> * * - * $esc.exclamation -> ! - * $esc.e -> ! - * - * Example tools.xml config (if you want to use this with VelocityView): + * $esc.exclamation -> ! + * $esc.e -> ! + * </pre> + * <p>Example tools.xml config (if you want to use this with VelocityView):</p> + * <pre> * <tools> * <toolbox scope="application"> * <tool class="org.apache.velocity.tools.generic.EscapeTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * <p>This tool is entirely threadsafe, and has no instance members. * It may be used in any scope (request, session, or application). @@ -180,9 +181,8 @@ public class EscapeTool extends SafeConf } /** - * Escapes the characters in a <code>String</code> using Java String rules. - * <br /> - * Delegates the process to {@link StringEscapeUtils#escapeJava(String)}. + * <p>Escapes the characters in a <code>String</code> using Java String rules.</p> + * <p>Delegates the process to {@link StringEscapeUtils#escapeJava(String)}.</p> * * @param string the string to escape values, may be null * @return String with escaped values, <code>null</code> if null string input @@ -277,9 +277,8 @@ public class EscapeTool extends SafeConf } /** - * Escapes the characters in a <code>String</code> using JavaScript String rules. - * <br /> - * Delegates the process to {@link StringEscapeUtils#escapeEcmaScript(String)}. + * <p>Escapes the characters in a <code>String</code> using JavaScript String rules.</p> + * <p>Delegates the process to {@link StringEscapeUtils#escapeEcmaScript(String)}.</p> * * @param string the string to escape values, may be null * @return String with escaped values, <code>null</code> if null string input @@ -296,9 +295,8 @@ public class EscapeTool extends SafeConf } /** - * Escapes the characters in a <code>String</code> using HTML entities. - * <br /> - * Delegates the process to {@link StringEscapeUtils#escapeHtml4(String)}. + * <p>Escapes the characters in a <code>String</code> using HTML entities.</p> + * <p>Delegates the process to {@link StringEscapeUtils#escapeHtml4(String)}.</p> * * @param string the string to escape, may be null * @return a new escaped <code>String</code>, <code>null</code> if null string input @@ -315,13 +313,12 @@ public class EscapeTool extends SafeConf } /** - * Escape the characters in a <code>String</code> to be suitable to use as an HTTP parameter value. - * <br/> - * Uses UTF-8 as default character encoding. + * <p>Escape the characters in a <code>String</code> to be suitable to use as an HTTP parameter value.</p> + * <p>Uses UTF-8 as default character encoding.</p> * @param string the string to escape, may be null * @return a new escaped <code>String</code>, <code>null</code> if null string input * - * See java.net.URLEncoder#encode(String,String). + * See java.net.URLEncoder#encode(String,String) * @since VelocityTools 1.3 */ public String url(Object string) { @@ -336,13 +333,12 @@ public class EscapeTool extends SafeConf } /** - * Unscape the characters in a <code>String</code> encoded as an HTTP parameter value. - * <br/> - * Uses UTF-8 as default character encoding. + * <p>Unscape the characters in a <code>String</code> encoded as an HTTP parameter value.</p> + * <p>Uses UTF-8 as default character encoding.</p> * @param string the string to unescape, may be null * @return a new unescaped <code>String</code>, <code>null</code> if null string input * - * @see java.net.URLDecoder#decode(String,String). + * @see java.net.URLDecoder#decode(String,String) * @since VelocityTools 3.0 */ public String unurl(Object string) { @@ -357,9 +353,8 @@ public class EscapeTool extends SafeConf } /** - * Escapes the characters in a <code>String</code> using XML entities. - * <br /> - * Delegates the process to {@link StringEscapeUtils#escapeXml(String)}. + * <p>Escapes the characters in a <code>String</code> using XML entities.</p> + * <p>Delegates the process to {@link StringEscapeUtils#escapeXml(java.lang.String)}.</p> * * @param string the string to escape, may be null * @return a new escaped <code>String</code>, <code>null</code> if null string input @@ -376,9 +371,8 @@ public class EscapeTool extends SafeConf } /** - * Escapes the characters in a <code>String</code> to be suitable to pass to an SQL query. - * <br /> - * It boils down to doubling single quotes. + * <p>Escapes the characters in a <code>String</code> to be suitable to pass to an SQL query.</p> + * <p>It boils down to doubling single quotes.</p> * * @param string the string to escape, may be null * @return a new String, escaped for SQL, <code>null</code> if null string input @@ -394,12 +388,12 @@ public class EscapeTool extends SafeConf } /** - * Converts the specified Unicode code point and/or escape sequence into + * <p>Converts the specified Unicode code point and/or escape sequence into * the associated Unicode character. This allows numeric * code points or String versions of the numeric code point to be correctly * translated within a template. This is especially useful for those * creating unicode from a reference value, or injecting a unicode character - * into a template with a version of Velocity prior to 1.6. + * into a template with a version of Velocity prior to 1.6.</p> * @param code the code to be translated/escaped, may be null * @return the unicode character for that code, {@code null} if input was null * @see Character#toChars(int codePoint) Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/FieldTool.java Wed Jun 20 12:28:19 2018 @@ -34,11 +34,10 @@ import org.apache.velocity.tools.config. * This is a simple tools class to allow easy access to static fields in a class, * such as string constants from within a template. Velocity will not introspect * for class fields (and won't in the future :), but writing setter/getter methods - * to do this is a pain, so use this if you really have to access fields. + * to do this is a pain, so use this if you really have to access fields.</p> * - * <p> + * <p>Example uses in a template:</p> * <pre> - * Example uses in a template: * ## here we access a constant in a class include in the configuration * $field.COUNTER_NAME * @@ -53,16 +52,16 @@ import org.apache.velocity.tools.config. * ## available in the tool (change this by storeDynamicLookups="false") * ## so here we get another constant from the Integer class * $field.MAX_VALUE - * - * - * Example tools.xml config: + * </pre> + * <p>Example tools.xml config:</p> + * <pre> * <tools> * <toolbox scope="application"> * <tool class="org.apache.velocity.tools.generic.FieldTool" * include="org.apache.velocity.runtime.RuntimeConstants,com.org.MyConstants"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * <p> * Right now, this tool only gives access to <code>public static</code> fields. Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportSupport.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportSupport.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportSupport.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportSupport.java Wed Jun 20 12:28:19 2018 @@ -171,7 +171,6 @@ public class ImportSupport extends SafeC * @param url the URL to read * @return a Reader for the InputStream created from the supplied URL * @throws IOException - * @throws java.lang.Exception */ public Reader acquireReader(String url) throws IOException { @@ -191,7 +190,6 @@ public class ImportSupport extends SafeC * @param url the URL to read * @return a Reader for the InputStream created from the supplied URL * @throws IOException - * @throws java.lang.Exception */ protected Reader acquireRemoteURLReader(String url) throws IOException { @@ -305,7 +303,6 @@ public class ImportSupport extends SafeC * @param url the URL to read * @return a Reader for the InputStream created from the supplied URL * @throws IOException - * @throws java.lang.Exception */ protected Reader acquireLocalURLReader(String url) throws IOException { @@ -483,8 +480,6 @@ public class ImportSupport extends SafeC * then with a classpath entry. * @param resource the resource to read * @return the content of the resource - * @throws IOException - * @throws java.lang.Exception */ public String getResourceString(String resource) { @@ -518,8 +513,6 @@ public class ImportSupport extends SafeC * then with a classpath entry. * @param resource the resource to read * @return a reader of the resource - * @throws IOException - * @throws java.lang.Exception */ public Reader getResourceReader(String resource) { @@ -567,7 +560,6 @@ public class ImportSupport extends SafeC * @param resource the resource to read * @return the content of the resource * @throws IOException - * @throws java.lang.Exception */ protected URL getFileResource(String resource) throws Exception { @@ -585,7 +577,6 @@ public class ImportSupport extends SafeC * @param resource the resource to read * @return the content of the resource * @throws IOException - * @throws java.lang.Exception */ protected URL getClasspathResource(String resource) throws Exception { Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java Wed Jun 20 12:28:19 2018 @@ -28,14 +28,14 @@ import org.apache.velocity.tools.config. * <p>Usage: just call $import.read("http://www.foo.com/bleh.jsp?sneh=bar") to insert the contents of the named * resource into the template. * </p> - * <p><pre> - * Toolbox configuration: + * <p>Toolbox configuration:</p> + * <pre> * <tools> * <toolbox scope="request"> * <tool class="org.apache.velocity.tools.view.ImportTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author <a href="mailto:mari...@centrum.is">Marino A. Jonsson</a> * @since VelocityTools 3.0 Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonContent.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonContent.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonContent.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonContent.java Wed Jun 20 12:28:19 2018 @@ -82,7 +82,7 @@ public class JsonContent /** * Get a value from root array - * @param key + * @param index * @return value, or null */ public Object get(int index) Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java Wed Jun 20 12:28:19 2018 @@ -41,34 +41,27 @@ import org.w3c.dom.Document; import org.w3c.dom.Node; /** - * <p>Tool which can parse a JSON file.</o> + * <p>Tool which can parse a JSON file.</p> * <p>Usage:</p> - * <p> - * <ul> - * <li>$json.parse(<i>json string</i>)</li> - * <li>$json.read(<i>file or classpath resource</i>)</li> - * <li>$json.fetch(<i>URL</i>)</li> - * </ul> - * </p> + * <ul> + * <li>$json.parse(<i>json string</i>)</li> + * <li>$json.read(<i>file or classpath resource</i>)</li> + * <li>$json.fetch(<i>URL</i>)</li> + * </ul> * <p>Configuration parameters:</p> - * <p> - * <ul> - * <li><code>resource</code>=<i>file or classpath resource</i></li> - * <li><code>source</code>=<i>URL</i></li> - * </ul> - * </p> - * <p> - * <pre> - * Example configuration: + * <ul> + * <li><code>resource</code>=<i>file or classpath resource</i></li> + * <li><code>source</code>=<i>URL</i></li> + * </ul> + * <p>Example configuration:</p> + * <pre> * <tools> * <toolbox scope="request"> * <tool class="org.apache.velocity.tools.generic.JsonTool" * key="foo" resource="doc.xml"/> * </toolbox> * </tools> - * - * </pre> - * </p> + * </pre> * @author Claude Brisson * @since VelocityTools 3.0 * @version $Id:$ Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java Wed Jun 20 12:28:19 2018 @@ -35,13 +35,13 @@ import org.apache.velocity.tools.config. import org.apache.velocity.tools.config.ValidScope; /** - * <p>The LinkTool provides many methods to work with URIs and can help you: + * <p>The LinkTool provides many methods to work with URIs and can help you:</p> * <ul> * <li>construct full URIs (opaque, absolute or relative)</li> * <li>encode and decode URLs (part or whole)</li> * <li>retrieve path info for the current request</li> * <li>and more..</li> - * </ul></p> + * </ul> * * <p>This GenericTools (i.e. non-servlet based) version of LinkTool * is largely based upon the same API and behavior as the older @@ -57,8 +57,8 @@ import org.apache.velocity.tools.config. * a new instance of LinkTool. This facilitates greatly the repeated use * of the LinkTool in Velocity and leads to an elegant syntax.</p> * - * <p><pre> - * Template example(s): + * <p>Template example(s):</p> + * <pre> * #set( $base = $link.relative('MyPage.vm').anchor('view') ) * <a href="$base.param('select','this')">this</a> * <a href="$base.param('select','that')">that</a> @@ -70,7 +70,7 @@ import org.apache.velocity.tools.config. * uri="http://velocity.apache.org/tools/devel/"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author Nathan Bubna * @since VelocityTools 2.0 @@ -82,7 +82,7 @@ import org.apache.velocity.tools.config. @ValidScope(Scope.REQUEST) public class LinkTool extends SafeConfig implements Cloneable { - /** Standard HTML delimiter for query data ('&') */ + /** Standard HTML delimiter for query data ('&') */ public static final String HTML_QUERY_DELIMITER = "&"; /** XHTML delimiter for query data ('&amp;') */ @@ -254,14 +254,14 @@ public class LinkTool extends SafeConfig /** * <p>Controls the delimiter used for separating query data pairs. - * By default, the standard '&' character is used.</p> + * By default, the standard '&' character is used.</p> * <p>This is not exposed to templates as this decision is best not * made at that level.</p> * <p>Subclasses may easily override the init() method to set this * appropriately and then call super.init()</p> * * @param xhtml if true, the XHTML query data delimiter ('&amp;') - * will be used. if false, then '&' will be used. + * will be used. if false, then '&' will be used. * @see <a href="http://www.w3.org/TR/xhtml1/#C_12">Using Ampersands in Attribute Values (and Elsewhere)</a> */ public void setXHTML(boolean xhtml) @@ -1260,10 +1260,10 @@ public class LinkTool extends SafeConfig * set to true. If the specified relative path is null, that is treated * the same as an empty path.</p> * - * Example:<br> + * <p>Example: * <code><a href='$link.relative("/login/index.vm")'>Login Page</a></code><br> - * produces something like</br> - * <code><a href="/myapp/login/index.vm">Login Page</a></code><br> + * produces something like<br> + * <code><a href="/myapp/login/index.vm">Login Page</a></code></p> * * @param obj A directory-relative URI reference (e.g. file path in current directory) * @return a new instance of LinkTool with the specified changes @@ -1333,17 +1333,18 @@ public class LinkTool extends SafeConfig * or anchor, those values will not be overwritten when using * this method.</p> * - * Example:<br> + * <p>Example:<br> * <code><a href='$link.absolute("login/index.vm")'>Login Page</a></code><br> - * produces something like<br/> + * produces something like<br> * <code><a href="http://myserver.net/myapp/login/index.vm">Login Page</a></code>;<br> * <code><a href='$link.absolute("/login/index.vm")'>Login Page</a></code><br> - * produces something like<br/> + * produces something like<br> * <code><a href="http://myserver.net/login/index.vm">Login Page</a></code>;<br> * and<br> * <code><a href='$link.absolute("http://theirserver.com/index.jsp")'>Their, Inc.</a></code><br> - * produces something like<br/> - * <code><a href="http://theirserver.net/index.jsp">Their, Inc.</a></code><br> + * produces something like<br> + * <code><a href="http://theirserver.net/index.jsp">Their, Inc.</a></code> + * </p> * * @param obj A root-relative or context-relative path or an absolute URI. * @return a new instance of LinkTool with the specified path or URI @@ -1560,10 +1561,10 @@ public class LinkTool extends SafeConfig * <p>Returns a copy of the link with the specified anchor to be * added to the end of the generated hyperlink.</p> * - * Example:<br> + * <p>Example:<br> * <code><a href='$link.setAnchor("foo")'>Foo</a></code><br> - * produces something like</br> - * <code><a href="#foo">Foo</a></code><br> + * produces something like<br> + * <code><a href="#foo">Foo</a></code></p> * * @param anchor an internal document reference * @return a new instance of LinkTool with the set anchor @@ -1592,7 +1593,7 @@ public class LinkTool extends SafeConfig /** * Returns the full URI reference that's been built with this tool, * including the query string and anchor, e.g. - * <code>http://myserver.net/myapp/stuff/View.vm?id=42&type=blue#foo</code>. + * <code>http://myserver.net/myapp/stuff/View.vm?id=42&type=blue#foo</code>. * Typically, it is not necessary to call this method explicitely. * Velocity will call the toString() method automatically to obtain * a representable version of an object. Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java Wed Jun 20 12:28:19 2018 @@ -31,23 +31,22 @@ import org.slf4j.LoggerFactory; * <p> * Of course, the desired log level must have been configured, using the method specific * to the SLF4J implementation you are using. For instance, when using the webapp-slf4j-logger, - * you will use the following snippet of code in you /WEB-INF/web.xml file: + * you will use the following snippet of code in you /WEB-INF/web.xml file:</p> * <pre> * <context-param> * <param-name>webapp-slf4j-logger.level</param-name> * <param-value>debug</param-value> * </context-param> * </pre> - * </p> * - * <p>You can optionnaly specify the logger name in the config (the default is to re-use the engine logger): + * <p>You can optionnaly specify the logger name in the config (the default is to re-use the engine logger):</p> * <pre> * <tools> * <toolbox scope="application"> * <tool class="org.apache.velocity.tools.generic.LogTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author Claude Brisson * @since VelocityTools 3.0 Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java Wed Jun 20 12:28:19 2018 @@ -59,23 +59,24 @@ import org.apache.velocity.tools.config. * </p> * <p> * Example of use: + * </p> * <pre> * Template * --- * #set( $list = [1..7] ) * #set( $others = [3..10] ) * #foreach( $item in $loop.watch($list).sync($others, 'other') ) - * $item -> $loop.other - * #if( $item >= 5 )$loop.stop()#end + * $item -> $loop.other + * #if( $item >= 5 )$loop.stop()#end * #end * * Output * ------ - * 1 -> 3 - * 2 -> 4 - * 3 -> 5 - * 4 -> 6 - * 5 -> 7 + * 1 -> 3 + * 2 -> 4 + * 3 -> 5 + * 4 -> 6 + * 5 -> 7 * * Example tools.xml config (if you want to use this with VelocityView): * <tools> @@ -84,7 +85,6 @@ import org.apache.velocity.tools.config. * </toolbox> * </tools> * </pre> - * </p> * * @author Nathan Bubna * @version $Id: LoopTool.java 590893 2007-11-01 04:40:21Z nbubna $ @@ -377,9 +377,9 @@ public class LoopTool extends SafeConfig } /** - * <p>This serves two purposes: + * <p>This serves two purposes:</p> * <ul><li>Getting the current value of a sync'ed iterator</li> - * <li>Abbreviate syntax for properties of outer loops</li></ul></p> + * <li>Abbreviate syntax for properties of outer loops</li></ul> * <p>First, it searches all the loops being managed for one * with a sync'ed Iterator under the specified name and * returns the current value for that sync'ed iterator, Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java Wed Jun 20 12:28:19 2018 @@ -34,19 +34,18 @@ import org.apache.velocity.tools.config. * * <p> * A tool to make it easy to generate XML or HTML on the fly. It uses a CSS-type - * syntax with a vaguely jQuery-ish API to help you generate the markup you need. - * <p> + * syntax with a vaguely jQuery-ish API to help you generate the markup you need.</p> * <pre> * Example uses in a template: * #set( $foospan = $markup.span.id($foo.id).body($foo) ) * $markup.tag('table tr.bar td').body("This is $foospan") * * Output: - * <table> - * <tr class="bar"> - * <td>This is <span id="foo1">my first foo.</span></td> - * </tr> - * </table> + * <table> + * <tr class="bar"> + * <td>This is <span id="foo1">my first foo.</span></td> + * </tr> + * </table> * * * Example tools.xml config: @@ -55,7 +54,7 @@ import org.apache.velocity.tools.config. * <tool class="org.apache.velocity.tools.generic.alpha.MarkupTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author Nathan Bubna * @since VelocityTools 2.0 Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java Wed Jun 20 12:28:19 2018 @@ -44,14 +44,14 @@ import org.apache.velocity.tools.config. * debugging feedback that Velocity will render the reference * literally. (e.g. $math.div(1, 0) renders as '$math.div(1, 0)')</li> * </ul> - * <p><pre> - * Example tools.xml config: + * <p>Example tools.xml config:</p> + * <pre> * <tools> * <toolbox scope="application"> * <tool class="org.apache.velocity.tools.generic.MathTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author Nathan Bubna * @author Leon Messerschmidt @@ -679,7 +679,7 @@ public class MathTool extends FormatConf * an instance of the best matching type (Integer, Long, or Double). * If either an argument or the result is not an integer (i.e. has no * decimal when rendered) the result will be returned as a Double. - * If not and the result is < -2147483648 or > 2147483647, then a + * If not and the result is < -2147483648 or > 2147483647, then a * Long will be returned. Otherwise, an Integer will be returned. */ protected Number matchType(double out, Number... in) Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java Wed Jun 20 12:28:19 2018 @@ -28,17 +28,17 @@ import org.apache.velocity.tools.ToolCon import org.apache.velocity.tools.config.DefaultKey; /** - * Tool for working with {@link Number} in Velocity templates. + * <p>Tool for working with {@link Number} in Velocity templates. * It is useful for accessing and * formatting arbitrary {@link Number} objects. Also * the tool can be used to retrieve {@link NumberFormat} instances - * or make conversions to and from various number types. - * <p><pre> + * or make conversions to and from various number types.</p> + * <pre> * Example uses: - * $myNumber -> 13.55 - * $number.format($myNumber) -> 13.6 - * $number.currency($myNumber) -> $13.55 - * $number.integer($myNumber) -> 13 + * $myNumber -gt; 13.55 + * $number.format($myNumber) -gt; 13.6 + * $number.currency($myNumber) -gt; $13.55 + * $number.integer($myNumber) -gt; 13 * * Example tools.xml config (if you want to use this with VelocityView): * <tools> @@ -46,7 +46,7 @@ import org.apache.velocity.tools.config. * <tool class="org.apache.velocity.tools.generic.MathTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * <p>This tool is entirely threadsafe, and has no instance members. * It may be used in any scope (request, session, or application). Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java Wed Jun 20 12:28:19 2018 @@ -31,16 +31,16 @@ import org.apache.velocity.tools.config. /** * <p>Tool for accessing ResourceBundles and formatting messages therein.</p> - * <p><pre> - * Template example(s): - * $text.foo -> bar - * $text.hello.world -> Hello World! - * $text.keys -> [foo, hello.world, world] + * <p>Template example(s):</p> + * <pre> + * $text.foo -> bar + * $text.hello.world -> Hello World! + * $text.keys -> [foo, hello.world, world] * #set( $otherText = $text.bundle('otherBundle') ) - * $otherText.foo -> woogie - * $otherText.bar -> The args are {0} and {1}. - * $otherText.bar.insert(4) -> The args are 4 and {1}. - * $otherText.bar.insert(4,true) -> The args are 4 and true. + * $otherText.foo -> woogie + * $otherText.bar -> The args are {0} and {1}. + * $otherText.bar.insert(4) -> The args are 4 and {1}. + * $otherText.bar.insert(4,true) -> The args are 4 and true. * * Toolbox configuration example: * <tools> @@ -50,20 +50,19 @@ import org.apache.velocity.tools.config. * locale="en_US"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * <p>This comes in very handy when internationalizing templates. * Note that the default resource bundle baseName is "resources", and - * the default locale is either: - * <ul> - * <li>the result of HttpServletRequest.getLocale() (if used in request scope + * the default locale is either:<p> + * <ul> + * <li>the result of HttpServletRequest.getLocale() (if used in request scope * of a VelocityView app)</li> - * <li>the configured locale for this tool (as shown above)<li> - * <li>the configured locale for the toolbox this tool is in<li> - * <li>the configured locale for the toolbox factory managing this tool</li> - * <li>the system locale, if none of the above</li> - * </ul>. - * </p> + * <li>the configured locale for this tool (as shown above)<li> + * <li>the configured locale for the toolbox this tool is in<li> + * <li>the configured locale for the toolbox factory managing this tool</li> + * <li>the system locale, if none of the above</li> + * </ul> * <p>Also, be aware that very few performance considerations have been made * in this initial version. It should do fine, but if you have performance * issues, please report them to d...@velocity.apache.org, so we can make @@ -233,7 +232,7 @@ public class ResourceTool extends Locale * will be done. * * @param prefix the prefix for the requested keys - * @param bundles the resource bundles to search + * @param baseName the resource bundle base name * @param loc the locale to use */ public List<String> getKeys(String prefix, String baseName, Object loc) Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java Wed Jun 20 12:28:19 2018 @@ -31,9 +31,9 @@ import org.apache.commons.beanutils.Prop import org.apache.velocity.tools.config.DefaultKey; /** - * SortTool allows a user to sort a collection (or array, iterator, etc) + * <p>SortTool allows a user to sort a collection (or array, iterator, etc) * on any arbitary set of properties exposed by the objects contained - * within the collection. + * within the collection.</p> * * <p>The sort tool is specifically designed to use within a #foreach * but you may find other uses for it.</p> @@ -42,13 +42,12 @@ import org.apache.velocity.tools.config. * #foreach and the same constraints apply as well as the following. * Every object in the collection must support the set of properties * selected to sort on. Each property which is to be sorted on must - * return one of the follow: + * return one of the follow:</p> * <ul> * <li>Primitive type: e.g. int, char, long etc</li> * <li>Standard Object: e.g. String, Integer, Long etc</li> * <li>Object which implements the Comparable interface.</li> * </ul> - * </p> * * <p>During the sort operation all properties are compared by calling * compareTo() with the exception of Strings for which @@ -59,7 +58,7 @@ import org.apache.velocity.tools.config. * The original collection will not be re-ordered; a new list containing * the sorted elements will always be returned.</p> * - * <p>The tool is used as follows: + * <p>The tool is used as follows:</p> * <pre> * Single Property Sort * #foreach($obj in $sorter.sort($objects, "name")) @@ -74,7 +73,7 @@ import org.apache.velocity.tools.config. * End * </pre> * - * The sort method takes two parameters a collection and a property name + * <p>The sort method takes two parameters a collection and a property name * or an array of property names. The property names and corresponding * methods must conform to java bean standards since commons-beanutils * is used to extract the property values.</p> @@ -82,7 +81,7 @@ import org.apache.velocity.tools.config. * <p>By default the sort tool sorts ascending, you can override this by * adding a sort type suffix to any property name.</p> * - * <p>The supported suffixes are: + * <p>The supported suffixes are:</p> * <pre> * For ascending * :asc @@ -93,20 +92,20 @@ import org.apache.velocity.tools.config. * #foreach($obj in $sorter.sort($objects, ["name:asc", "ordinal:desc"])) * $obj.name, $obj.ordinal * #end - * </pre><p> + * </pre> * * <p>This will sort first by Name in ascending order and then by Ordinal * in descending order, of course you could have left the :asc off of the * 'Name' property as ascending is always the default.</p> * - * <p><pre> - * Example tools.xml config (if you want to use this with VelocityView): + * <p>Example tools.xml config (if you want to use this with VelocityView):</p> + * <pre> * <tools> * <toolbox scope="application"> * <tool class="org.apache.velocity.tools.generic.SortTool"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * * @author S. Brett Sutton * @author Nathan Bubna Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ValueParser.java Wed Jun 20 12:28:19 2018 @@ -38,7 +38,7 @@ import org.apache.velocity.tools.config. * <p>This comes in very handy when parsing parameters.</p> * * <p>When subkeys are allowed, getValue("foo") will also search for all keys - * of the form "foo.bar" and return a ValueParser of the type "bar" -> value for all found values.</p> + * of the form "foo.bar" and return a ValueParser of the type "bar" -> value for all found values.</p> * * TODO: someone doing java configuration ought to be able to put a source Map * in the tool properties, allowing this to be used like other tools @@ -661,7 +661,7 @@ public class ValueParser extends FormatC } /** - * subkey getter that returns a map <subkey#2> -> value + * subkey getter that returns a map subkey#2 -> value * for every "subkey.subkey2" found entry * * @param subkey subkey to search for Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java?rev=1833909&r1=1833908&r2=1833909&view=diff ============================================================================== --- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java (original) +++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java Wed Jun 20 12:28:19 2018 @@ -45,14 +45,13 @@ import org.w3c.dom.Text; * <p>Tool for reading/navigating XML files. This uses dom4j under the * covers to provide complete XPath support for traversing XML files.</p> * <p>Configuration parameters:</p> - * <p> - * <ul> - * <li><code>resource</code>=<i>file or classpath resource</i></li> - * <li><code>source</code>=<i>URL</i></li> - * </ul> - * </p> + * <ul> + * <li><code>resource</code>=<i>file or classpath resource</i></li> + * <li><code>source</code>=<i>URL</i></li> + * </ul> * - * <p>Here's a short example:<pre> + * <p>Here's a short example:</p> + * <pre> * XML file: * <foo><bar>woogie</bar><a name="test"/></foo> * @@ -73,7 +72,7 @@ import org.w3c.dom.Text; * key="foo" source="doc.xml"/> * </toolbox> * </tools> - * </pre></p> + * </pre> * <p>Note that this tool is included in the default GenericTools configuration * under the key "xml". You can read but unless you set safeMode="false" for it, you will * only be able to parse XML strings. Safe mode is on by default and blocks