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 2016/12/09 13:44:14 UTC
svn commit: r1773389 - in /velocity/tools/trunk: src/changes/
velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/
velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/
velocity-tools-view/src/main/java/org/apache/ve...
Author: cbrisson
Date: Fri Dec 9 13:44:13 2016
New Revision: 1773389
URL: http://svn.apache.org/viewvc?rev=1773389&view=rev
Log:
[tools] reflect last engine changes: no more commons-lang3 shading and use ExtProperties instead of ExtendedProperties everywhere
Modified:
velocity/tools/trunk/src/changes/changes.xml
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/generic/EscapeTool.java
velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.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/WebappResourceLoader.java
Modified: velocity/tools/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/changes/changes.xml?rev=1773389&r1=1773388&r2=1773389&view=diff
==============================================================================
--- velocity/tools/trunk/src/changes/changes.xml (original)
+++ velocity/tools/trunk/src/changes/changes.xml Fri Dec 9 13:44:13 2016
@@ -48,7 +48,7 @@
Switched engine dependency to 2.0
</action>
<action type="add" dev="cbrisson">
- Reflect Velocity Engine dependency shading of commons-lang and commons-collections
+ Replace all uses of commons-collections ExtendedProperties class by org.apache.velocity.util.ExtProperties
</action>
<action type="add" dev="cbrisson">
Removed deprecated class org.apache.velocity.tools.generic.log.LogSystemCommonsLog
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=1773389&r1=1773388&r2=1773389&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 Fri Dec 9 13:44:13 2016
@@ -23,11 +23,11 @@ import java.io.InputStream;
import java.io.IOException;
import java.util.Iterator;
import org.apache.commons.beanutils.BeanUtils;
-import org.apache.velocity.shaded.commons.collections.ExtendedProperties;
+import org.apache.velocity.util.ExtProperties;
/**
* <p> This reads in configuration info formatted as a property
- * file using {@link ExtendedProperties} from Commons-Collections.</p>
+ * file using {@link org.apache.velocity.util.ExtProperties}.</p>
* <p>Example usage:
* <pre>
* FactoryConfiguration cfg = new PropertiesFactoryConfiguration();
@@ -87,14 +87,14 @@ public class PropertiesFactoryConfigurat
*/
public void read(InputStream input) throws IOException
{
- ExtendedProperties props = new ExtendedProperties();
+ ExtProperties props = new ExtProperties();
props.load(input);
// all factory settings should be prefixed with "tools"
read(props.subset("tools"));
}
- public void read(ExtendedProperties factory)
+ public void read(ExtProperties factory)
{
// get the global properties
readProperties(factory, this);
@@ -107,10 +107,10 @@ public class PropertiesFactoryConfigurat
}
- protected void readProperties(ExtendedProperties configProps,
+ protected void readProperties(ExtProperties configProps,
Configuration config)
{
- ExtendedProperties properties = configProps.subset("property");
+ ExtProperties properties = configProps.subset("property");
if (properties != null)
{
for (Iterator i = properties.getKeys(); i.hasNext(); )
@@ -118,7 +118,7 @@ public class PropertiesFactoryConfigurat
String name = (String)i.next();
String value = properties.getString(name);
- ExtendedProperties propProps = properties.subset(name);
+ ExtProperties propProps = properties.subset(name);
if (propProps.size() == 1)
{
// then set this as a 'simple' property
@@ -138,7 +138,7 @@ public class PropertiesFactoryConfigurat
}
}
- protected void readToolboxes(ExtendedProperties factory)
+ protected void readToolboxes(ExtProperties factory)
{
String[] scopes = factory.getStringArray("toolbox");
for (String scope : scopes)
@@ -147,13 +147,13 @@ public class PropertiesFactoryConfigurat
toolbox.setScope(scope);
addToolbox(toolbox);
- ExtendedProperties toolboxProps = factory.subset(scope);
+ ExtProperties toolboxProps = factory.subset(scope);
readTools(toolboxProps, toolbox);
readProperties(toolboxProps, toolbox);
}
}
- protected void readTools(ExtendedProperties tools,
+ protected void readTools(ExtProperties tools,
ToolboxConfiguration toolbox)
{
for (Iterator i = tools.getKeys(); i.hasNext(); )
@@ -173,7 +173,7 @@ public class PropertiesFactoryConfigurat
toolbox.addTool(tool);
// get tool properties prefixed by 'property'
- ExtendedProperties toolProps = tools.subset(key);
+ ExtProperties toolProps = tools.subset(key);
readProperties(toolProps, tool);
// ok, get tool properties that aren't prefixed by 'property'
@@ -192,7 +192,7 @@ public class PropertiesFactoryConfigurat
}
}
- protected void readData(ExtendedProperties dataset)
+ protected void readData(ExtProperties dataset)
{
if (dataset != null)
{
@@ -211,7 +211,7 @@ public class PropertiesFactoryConfigurat
data.setValue(dataset.getString(key));
// get/set the type/converter properties
- ExtendedProperties props = dataset.subset(key);
+ ExtProperties props = dataset.subset(key);
setProperties(props, data);
addData(data);
@@ -219,7 +219,7 @@ public class PropertiesFactoryConfigurat
}
}
- protected void setProperties(ExtendedProperties props, Data data)
+ protected void setProperties(ExtProperties props, Data data)
{
// let's just set/convert anything we can
// this could be simplified to just check for type/class/converter
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=1773389&r1=1773388&r2=1773389&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 Fri Dec 9 13:44:13 2016
@@ -22,7 +22,7 @@ package org.apache.velocity.tools.generi
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
-import org.apache.velocity.shaded.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.velocity.tools.Scope;
import org.apache.velocity.tools.config.DefaultKey;
import org.apache.velocity.tools.config.ValidScope;
Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java?rev=1773389&r1=1773388&r2=1773389&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java Fri Dec 9 13:44:13 2016
@@ -1,8 +1,8 @@
package org.apache.velocity.tools.view;
import org.apache.velocity.exception.VelocityException;
-import org.apache.velocity.shaded.commons.lang3.tuple.ImmutablePair;
-import org.apache.velocity.shaded.commons.lang3.tuple.Pair;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
import org.apache.velocity.tools.ClassUtils;
import org.slf4j.Logger;
Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java?rev=1773389&r1=1773388&r2=1773389&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewServlet.java Fri Dec 9 13:44:13 2016
@@ -37,7 +37,7 @@ import org.apache.velocity.Template;
import org.apache.velocity.context.Context;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ResourceNotFoundException;
-import org.apache.velocity.shaded.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
/**
* <p>A servlet to process Velocity templates. This is comparable to the
Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappResourceLoader.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappResourceLoader.java?rev=1773389&r1=1773388&r2=1773389&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappResourceLoader.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/WebappResourceLoader.java Fri Dec 9 13:44:13 2016
@@ -26,7 +26,7 @@ import java.util.HashMap;
import javax.servlet.ServletContext;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.runtime.resource.Resource;
-import org.apache.velocity.runtime.resource.loader.ResourceLoader2;
+import org.apache.velocity.runtime.resource.loader.ResourceLoader;
import org.apache.velocity.util.ExtProperties;
/**
@@ -52,7 +52,7 @@ import org.apache.velocity.util.ExtPrope
* @author <a href="mailto:claude@savoirweb.com">Claude Brisson</a>
* @version $Id$ */
-public class WebappResourceLoader extends ResourceLoader2
+public class WebappResourceLoader extends ResourceLoader
{
/** The root paths for templates (relative to webapp's root). */
protected String[] paths = null;