You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by tv...@apache.org on 2011/10/09 19:16:22 UTC
svn commit: r1180657 - in /turbine/fulcrum/trunk/parser: ./
src/java/org/apache/fulcrum/parser/
Author: tv
Date: Sun Oct 9 17:16:21 2011
New Revision: 1180657
URL: http://svn.apache.org/viewvc?rev=1180657&view=rev
Log:
- Move to JDK 1.5 minimum
- Introduce generics
- Get rid of the commons-collections dependency
Modified:
turbine/fulcrum/trunk/parser/pom.xml
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/BaseValueParser.java
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/CSVParser.java
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DataStreamParser.java
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParserService.java
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ParserService.java
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/TSVParser.java
turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ValueParser.java
Modified: turbine/fulcrum/trunk/parser/pom.xml
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/pom.xml?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/pom.xml (original)
+++ turbine/fulcrum/trunk/parser/pom.xml Sun Oct 9 17:16:21 2011
@@ -92,11 +92,6 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
@@ -148,6 +143,8 @@
</profiles>
<properties>
+ <maven.compile.source>1.5</maven.compile.source>
+ <maven.compile.target>1.5</maven.compile.target>
<!-- This bits are used for the staging directory -->
<fulcrum.release.version>1.0.2</fulcrum.release.version>
<fulcrum.rc.version>RC1</fulcrum.rc.version>
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/BaseValueParser.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/BaseValueParser.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/BaseValueParser.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/BaseValueParser.java Sun Oct 9 17:16:21 2011
@@ -31,13 +31,11 @@ import java.text.ParseException;
import java.text.ParsePosition;
import java.util.Date;
import java.util.Hashtable;
-import java.util.Iterator;
import java.util.Locale;
import java.util.Set;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
-import org.apache.commons.collections.iterators.ArrayIterator;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.fulcrum.pool.Recyclable;
@@ -51,7 +49,7 @@ import org.apache.fulcrum.pool.Recyclabl
*
* <p>NOTE: The name= portion of a name=value pair may be converted
* to lowercase or uppercase when the object is initialized and when
- * new data is added. This behaviour is determined by the url.case.folding
+ * new data is added. This behavior is determined by the url.case.folding
* property in TurbineResources.properties. Adding a name/value pair may
* overwrite existing name=value pairs if the names match:
*
@@ -96,17 +94,17 @@ public class BaseValueParser
/**
* Random access storage for parameter data.
*/
- protected Hashtable parameters = new Hashtable();
+ protected Hashtable<String, Object> parameters = new Hashtable<String, Object>();
/** The locale to use when converting dates, floats and decimals */
private Locale locale = Locale.getDefault();
-
+
/** The DateFormat to use for converting dates */
private DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, locale);
-
+
/** The NumberFormat to use when converting floats and decimals */
private NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
-
+
public BaseValueParser()
{
this(DEFAULT_CHARACTER_ENCODING);
@@ -129,14 +127,13 @@ public class BaseValueParser
recycle(characterEncoding);
setLocale(locale);
}
-
+
/**
* Set a ParserService instance
*/
public void setParserService(ParserService parserService)
{
this.parserService = parserService;
-
}
/**
@@ -149,14 +146,14 @@ public class BaseValueParser
/**
* Provide an Avalon logger to the derived classes
- *
+ *
* @return An Avalon logger instance
*/
protected Logger getLogger()
{
return logger;
}
-
+
/**
* Recycles the parser.
*/
@@ -217,7 +214,7 @@ public class BaseValueParser
setDateFormat(DateFormat.getDateInstance(DateFormat.SHORT, locale));
setNumberFormat(NumberFormat.getNumberInstance(locale));
}
-
+
/**
* Get the locale that will be used by this ValueParser.
*/
@@ -257,7 +254,7 @@ public class BaseValueParser
{
return numberFormat;
}
-
+
/**
* Add a name/value pair into this object.
*
@@ -388,7 +385,7 @@ public class BaseValueParser
*
* @return A <code>Set</code> of the keys.
*/
- public Set keySet()
+ public Set<String> keySet()
{
return parameters.keySet();
}
@@ -398,11 +395,11 @@ public class BaseValueParser
*
* @return A object array with the keys.
*/
- public Object[] getKeys()
+ public String[] getKeys()
{
- return keySet().toArray();
+ return keySet().toArray(new String[0]);
}
-
+
/**
* Returns a Boolean object for the given string. If the value
* can not be parsed as a boolean, null is returned.
@@ -419,7 +416,7 @@ public class BaseValueParser
{
Boolean result = null;
String value = StringUtils.trim(string);
-
+
if (StringUtils.isNotEmpty(value))
{
for (int cnt = 0;
@@ -440,7 +437,7 @@ public class BaseValueParser
break;
}
}
-
+
if (result == null)
{
if (getLogger().isWarnEnabled())
@@ -450,7 +447,7 @@ public class BaseValueParser
}
}
}
-
+
return result;
}
@@ -502,7 +499,7 @@ public class BaseValueParser
}
return result;
}
-
+
/**
* Returns a Boolean object for the given name. If the parameter
* does not exist or can not be parsed as a boolean, null is returned.
@@ -566,7 +563,7 @@ public class BaseValueParser
*
* @param string A String with the value.
* @return A Number.
- *
+ *
*/
private Number parseNumber(String string)
{
@@ -577,7 +574,7 @@ public class BaseValueParser
{
ParsePosition pos = new ParsePosition(0);
Number number = numberFormat.parse(value, pos);
-
+
if (pos.getIndex() == value.length())
{
// completely parsed
@@ -592,7 +589,7 @@ public class BaseValueParser
}
}
}
-
+
return result;
}
@@ -602,7 +599,7 @@ public class BaseValueParser
*
* @param name A String with the name.
* @return A Number.
- *
+ *
*/
private Number getNumber(String name)
{
@@ -1324,7 +1321,7 @@ public class BaseValueParser
*/
public void setProperties(Object bean) throws Exception
{
- Class beanClass = bean.getClass();
+ Class<?> beanClass = bean.getClass();
PropertyDescriptor[] props
= Introspector.getBeanInfo(beanClass).getPropertyDescriptors();
@@ -1349,10 +1346,8 @@ public class BaseValueParser
public String toString()
{
StringBuffer sb = new StringBuffer();
- for (Iterator iter = keySet().iterator(); iter.hasNext();)
+ for (String name : keySet())
{
- String name = (String) iter.next();
-
sb.append('{');
sb.append(name);
sb.append('=');
@@ -1369,14 +1364,7 @@ public class BaseValueParser
else
{
sb.append('[');
- for (Iterator it = new ArrayIterator(params); it.hasNext(); )
- {
- sb.append(it.next());
- if (it.hasNext())
- {
- sb.append(", ");
- }
- }
+ sb.append(StringUtils.join(params, ", "));
sb.append(']');
}
sb.append("}\n");
@@ -1426,60 +1414,60 @@ public class BaseValueParser
" is a read only property");
}
- Class propclass = prop.getPropertyType();
- Object[] args = {null};
+ Class<?> propclass = prop.getPropertyType();
+ Object arg = null;
if (propclass == String.class)
{
- args[0] = getString(prop.getName());
+ arg = getString(prop.getName());
}
else if (propclass == Byte.class || propclass == Byte.TYPE)
{
- args[0] = getByteObject(prop.getName());
+ arg = getByteObject(prop.getName());
}
else if (propclass == Integer.class || propclass == Integer.TYPE)
{
- args[0] = getIntObject(prop.getName());
+ arg = getIntObject(prop.getName());
}
else if (propclass == Long.class || propclass == Long.TYPE)
{
- args[0] = getLongObject(prop.getName());
+ arg = getLongObject(prop.getName());
}
else if (propclass == Boolean.class || propclass == Boolean.TYPE)
{
- args[0] = getBooleanObject(prop.getName());
+ arg = getBooleanObject(prop.getName());
}
else if (propclass == Double.class || propclass == Double.TYPE)
{
- args[0] = getDoubleObject(prop.getName());
+ arg = getDoubleObject(prop.getName());
}
else if (propclass == Float.class || propclass == Float.TYPE)
{
- args[0] = getFloatObject(prop.getName());
+ arg = getFloatObject(prop.getName());
}
else if (propclass == BigDecimal.class)
{
- args[0] = getBigDecimal(prop.getName());
+ arg = getBigDecimal(prop.getName());
}
else if (propclass == String[].class)
{
- args[0] = getStrings(prop.getName());
+ arg = getStrings(prop.getName());
}
else if (propclass == Object.class)
{
- args[0] = getObject(prop.getName());
+ arg = getObject(prop.getName());
}
else if (propclass == int[].class)
{
- args[0] = getInts(prop.getName());
+ arg = getInts(prop.getName());
}
else if (propclass == Integer[].class)
{
- args[0] = getIntObjects(prop.getName());
+ arg = getIntObjects(prop.getName());
}
else if (propclass == Date.class)
{
- args[0] = getDate(prop.getName());
+ arg = getDate(prop.getName());
}
else
{
@@ -1489,7 +1477,7 @@ public class BaseValueParser
+ propclass.toString());
}
- setter.invoke(bean, args);
+ setter.invoke(bean, arg);
}
/**
@@ -1522,7 +1510,7 @@ public class BaseValueParser
{
String key = convert(name);
Object value = parameters.get(key);
-
+
// todo sgoeschl 20070405 quick fix for Scott's test case - need to
// be reworked for proper functioning according to TV
if(value instanceof String[])
@@ -1582,12 +1570,12 @@ public class BaseValueParser
}
/**
- * A convert method, which trims the string data and applies the
+ * A convert method, which trims the string data and applies the
* conversion specified in the parameter given. It returns a new
* string so that it does not destroy the value data.
*
* @param value A String to be processed.
- * @param fold The parameter folding to be applied
+ * @param fold The parameter folding to be applied
* (see {@link ParserService})
* @return A new String converted to the correct case and trimmed.
*/
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/CSVParser.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/CSVParser.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/CSVParser.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/CSVParser.java Sun Oct 9 17:16:21 2011
@@ -70,7 +70,7 @@ public class CSVParser extends DataStrea
* @param in the input reader.
* @param columnNames a list of column names.
*/
- public CSVParser(Reader in, List columnNames)
+ public CSVParser(Reader in, List<String> columnNames)
{
super(in, columnNames, null);
}
@@ -84,7 +84,7 @@ public class CSVParser extends DataStrea
* @param columnNames a list of column names.
* @param characterEncoding the character encoding of the input.
*/
- public CSVParser(Reader in, List columnNames, String characterEncoding)
+ public CSVParser(Reader in, List<String> columnNames, String characterEncoding)
{
super(in, columnNames, characterEncoding);
}
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DataStreamParser.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DataStreamParser.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DataStreamParser.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DataStreamParser.java Sun Oct 9 17:16:21 2011
@@ -57,17 +57,17 @@ import org.apache.avalon.framework.logge
* @version $Id$
*/
public abstract class DataStreamParser
- implements Iterator, LogEnabled
+ implements Iterator<ValueParser>, LogEnabled
{
/**
* The list of column names.
*/
- private List columnNames;
+ private List<String> columnNames;
/**
* The stream tokenizer for reading values from the input reader.
*/
- private StreamTokenizer tokenizer;
+ private final StreamTokenizer tokenizer;
/**
* The parameter parser holding the values of columns for the current line.
@@ -98,7 +98,7 @@ public abstract class DataStreamParser
* @param columnNames a list of column names.
* @param characterEncoding the character encoding of the input.
*/
- public DataStreamParser(Reader in, List columnNames,
+ public DataStreamParser(Reader in, List<String> columnNames,
String characterEncoding)
{
this.columnNames = columnNames;
@@ -131,7 +131,7 @@ public abstract class DataStreamParser
/**
* Provide a logger
- *
+ *
* @see org.apache.avalon.framework.logger.LogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger)
*/
public void enableLogging(Logger logger)
@@ -144,7 +144,7 @@ public abstract class DataStreamParser
*
* @param columnNames A list of column names.
*/
- public void setColumnNames(List columnNames)
+ public void setColumnNames(List<String> columnNames)
{
this.columnNames = columnNames;
}
@@ -158,7 +158,7 @@ public abstract class DataStreamParser
public void readColumnNames()
throws IOException
{
- columnNames = new ArrayList();
+ columnNames = new ArrayList<String>();
neverRead = false;
tokenizer.nextToken();
@@ -214,7 +214,7 @@ public abstract class DataStreamParser
lineValues.clear();
}
- Iterator it = columnNames.iterator();
+ Iterator<String> it = columnNames.iterator();
tokenizer.nextToken();
while (tokenizer.ttype == StreamTokenizer.TT_WORD
|| tokenizer.ttype == '"')
@@ -266,10 +266,10 @@ public abstract class DataStreamParser
* @exception NoSuchElementException there are no more rows in the input
* or an IOException occurred.
*/
- public Object next()
+ public ValueParser next()
throws NoSuchElementException
{
- Object nextRow = null;
+ ValueParser nextRow = null;
try
{
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java Sun Oct 9 17:16:21 2011
@@ -24,7 +24,6 @@ package org.apache.fulcrum.parser;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Enumeration;
-import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
@@ -158,13 +157,12 @@ public class DefaultParameterParser
try
{
- List fileItems = parserService.parseUpload(request);
+ List<FileItem> fileItems = parserService.parseUpload(request);
if (fileItems != null)
{
- for (Iterator it = fileItems.iterator(); it.hasNext();)
+ for (FileItem fi : fileItems)
{
- FileItem fi = (FileItem) it.next();
if (fi.isFormField())
{
getLogger().debug("Found an simple form field: " + fi.getFieldName() +", adding value " + fi.getString());
@@ -199,7 +197,7 @@ public class DefaultParameterParser
}
}
- for (Enumeration names = request.getParameterNames();
+ for (Enumeration<?> names = request.getParameterNames();
names.hasMoreElements();)
{
String paramName = (String) names.nextElement();
@@ -248,9 +246,8 @@ public class DefaultParameterParser
if (getLogger().isDebugEnabled())
{
getLogger().debug("Parameters found in the Request:");
- for (Iterator it = keySet().iterator(); it.hasNext();)
+ for (String key : keySet())
{
- String key = (String) it.next();
getLogger().debug("Key: " + key + " -> " + getString(key));
}
}
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParserService.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParserService.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParserService.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/DefaultParserService.java Sun Oct 9 17:16:21 2011
@@ -33,6 +33,7 @@ import org.apache.avalon.framework.logge
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
+import org.apache.commons.fileupload.FileItem;
import org.apache.commons.lang.StringUtils;
import org.apache.fulcrum.pool.PoolException;
import org.apache.fulcrum.pool.PoolService;
@@ -42,7 +43,7 @@ import org.apache.fulcrum.upload.UploadS
/**
* The DefaultParserService provides the efault implementation
* of a {@link ParserService}.
- *
+ *
* @author <a href="mailto:tv@apache.org">Thomas Vandahl</a>
* @version $Id: BaseValueParser.java 542062 2007-05-28 00:29:43Z seade $
*/
@@ -71,7 +72,7 @@ public class DefaultParserService
* The pool service component to use
*/
private PoolService poolService = null;
-
+
/**
* Get the character encoding that will be used by this ValueParser.
*/
@@ -170,15 +171,15 @@ public class DefaultParserService
}
/**
- * Use the UploadService if available to parse the given request
+ * Use the UploadService if available to parse the given request
* for uploaded files
*
* @return A list of {@link org.apache.commons.upload.FileItem}s
- *
- * @throws ServiceException if parsing fails or the UploadService
+ *
+ * @throws ServiceException if parsing fails or the UploadService
* is not available
*/
- public List parseUpload(HttpServletRequest request) throws ServiceException
+ public List<FileItem> parseUpload(HttpServletRequest request) throws ServiceException
{
if (uploadService == null)
{
@@ -189,33 +190,32 @@ public class DefaultParserService
return uploadService.parseRequest(request);
}
}
-
+
/**
* Get a {@link ValueParser} instance from the service. Use the
* given Class to create the object.
- *
+ *
* @return An object that implements ValueParser
- *
+ *
* @throws InstantiationException if the instance could not be created
*/
- public ValueParser getParser(Class ppClass) throws InstantiationException
+ public ValueParser getParser(Class<? extends ValueParser> ppClass) throws InstantiationException
{
ValueParser vp = null;
-
+
try
{
vp = (ValueParser) poolService.getInstance(ppClass);
-
+
if (vp instanceof ParserServiceSupport)
{
((ParserServiceSupport)vp).setParserService(this);
}
-
+
if (vp instanceof LogEnabled)
{
((LogEnabled)vp).enableLogging(getLogger().getChildLogger(ppClass.getName()));
}
-
}
catch (PoolException pe)
{
@@ -232,7 +232,7 @@ public class DefaultParserService
/**
* Return a used Parser to the service. This allows for
* pooling and recycling
- *
+ *
* @param parser
*/
public void putParser(ValueParser parser)
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ParserService.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ParserService.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ParserService.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ParserService.java Sun Oct 9 17:16:21 2011
@@ -26,12 +26,13 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.avalon.framework.service.ServiceException;
+import org.apache.commons.fileupload.FileItem;
/**
* ParserService defines the methods which are needed by the parser objects
* to get their necessities.
- *
+ *
* @author <a href="mailto:tv@apache.org">Thomas Vandahl</a>
* @version $Id: ValueParser.java 535465 2007-05-05 06:58:06Z tv $
*/
@@ -111,17 +112,17 @@ public interface ParserService
String convertAndTrim(String value);
/**
- * A convert method, which trims the string data and applies the
+ * A convert method, which trims the string data and applies the
* conversion specified in the parameter given. It returns a new
* string so that it does not destroy the value data.
*
* @param value A String to be processed.
- * @param fold The parameter folding to be applied
+ * @param fold The parameter folding to be applied
* (see {@link ParserService})
* @return A new String converted to the correct case and trimmed.
*/
String convertAndTrim(String value, int fold);
-
+
/**
* Gets the folding value from the configuration
*
@@ -137,30 +138,30 @@ public interface ParserService
boolean getAutomaticUpload();
/**
- * Use the UploadService if available to parse the given request
+ * Use the UploadService if available to parse the given request
* for uploaded files
*
* @return A list of {@link org.apache.commons.upload.FileItem}s
- *
- * @throws ServiceException if parsing fails or the UploadService
+ *
+ * @throws ServiceException if parsing fails or the UploadService
* is not available
*/
- List parseUpload(HttpServletRequest request) throws ServiceException;
+ List<FileItem> parseUpload(HttpServletRequest request) throws ServiceException;
/**
* Get a {@link ValueParser} instance from the service. Use the
- * default imlementation.
- *
+ * default implementation.
+ *
* @return An object that implements ValueParser
- *
+ *
* @throws InstantiationException if the instance could not be created
*/
- ValueParser getParser(Class ppClass) throws InstantiationException;
+ ValueParser getParser(Class<? extends ValueParser> ppClass) throws InstantiationException;
/**
* Return a used Parser to the service. This allows for
* pooling and recycling
- *
+ *
* @param parser
*/
void putParser(ValueParser parser);
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/TSVParser.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/TSVParser.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/TSVParser.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/TSVParser.java Sun Oct 9 17:16:21 2011
@@ -71,7 +71,7 @@ public class TSVParser
* @param in the input reader.
* @param columnNames a list of column names.
*/
- public TSVParser(Reader in, List columnNames)
+ public TSVParser(Reader in, List<String> columnNames)
{
super(in, columnNames, null);
}
@@ -85,7 +85,7 @@ public class TSVParser
* @param columnNames a list of column names.
* @param characterEncoding the character encoding of the input.
*/
- public TSVParser(Reader in, List columnNames, String characterEncoding)
+ public TSVParser(Reader in, List<String> columnNames, String characterEncoding)
{
super(in, columnNames, characterEncoding);
}
Modified: turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ValueParser.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ValueParser.java?rev=1180657&r1=1180656&r2=1180657&view=diff
==============================================================================
--- turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ValueParser.java (original)
+++ turbine/fulcrum/trunk/parser/src/java/org/apache/fulcrum/parser/ValueParser.java Sun Oct 9 17:16:21 2011
@@ -98,7 +98,7 @@ public interface ValueParser
* Get the number format that will be used by this ValueParser.
*/
NumberFormat getNumberFormat();
-
+
/**
* Trims the string data and applies the conversion specified in
* the property given by URL_CASE_FOLDING. It returns a new
@@ -184,14 +184,14 @@ public interface ValueParser
*
* @return A <code>Set</code> of the keys.
*/
- Set keySet();
+ Set<String> keySet();
/**
* Returns all the available parameter names.
*
* @return A object array with the keys.
*/
- Object[] getKeys();
+ String[] getKeys();
/**
* Return a boolean for the given name. If the name does not