diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java
index 43b586115..40e484373 100644
--- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java
+++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PropertyMatches.java
@@ -54,7 +54,7 @@ final class PropertyMatches {
* @param propertyName the name of the property to find possible matches for
* @param beanClass the bean class to search for matches
*/
- public static PropertyMatches forProperty(String propertyName, Class beanClass) {
+ public static PropertyMatches forProperty(String propertyName, Class> beanClass) {
return forProperty(propertyName, beanClass, DEFAULT_MAX_DISTANCE);
}
@@ -64,7 +64,7 @@ final class PropertyMatches {
* @param beanClass the bean class to search for matches
* @param maxDistance the maximum property distance allowed for matches
*/
- public static PropertyMatches forProperty(String propertyName, Class beanClass, int maxDistance) {
+ public static PropertyMatches forProperty(String propertyName, Class> beanClass, int maxDistance) {
return new PropertyMatches(propertyName, beanClass, maxDistance);
}
@@ -81,7 +81,7 @@ final class PropertyMatches {
/**
* Create a new PropertyMatches instance for the given property.
*/
- private PropertyMatches(String propertyName, Class beanClass, int maxDistance) {
+ private PropertyMatches(String propertyName, Class> beanClass, int maxDistance) {
this.propertyName = propertyName;
this.possibleMatches = calculateMatches(BeanUtils.getPropertyDescriptors(beanClass), maxDistance);
}
diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/transform/CompositeItemTransformer.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/transform/CompositeItemTransformer.java
index c35659d53..740417111 100644
--- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/transform/CompositeItemTransformer.java
+++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/transform/CompositeItemTransformer.java
@@ -7,35 +7,33 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
/**
- * Composite {@link ItemTransformer} that passes the item through a sequence
- * of injected ItemTransformers (return value of previous transformation
- * is the entry value of the next).
+ * Composite {@link ItemTransformer} that passes the item through a sequence of
+ * injected ItemTransformers (return value of previous
+ * transformation is the entry value of the next).
*
* @author Robert Kasanicky
*/
public class CompositeItemTransformer implements ItemTransformer, InitializingBean {
- private List itemTransformers;
-
+ private List itemTransformers;
+
public Object transform(Object item) throws Exception {
Object result = item;
- for (Iterator iterator = itemTransformers.listIterator(); iterator.hasNext();) {
- result = ((ItemTransformer)iterator.next()).transform(result);
+ for (Iterator iterator = itemTransformers.listIterator(); iterator.hasNext();) {
+ result = iterator.next().transform(result);
}
return result;
}
public void afterPropertiesSet() throws Exception {
Assert.notEmpty(itemTransformers);
- for (Iterator iterator = itemTransformers.iterator(); iterator.hasNext();) {
- Assert.isInstanceOf(ItemTransformer.class, iterator.next());
- }
}
/**
- * @param itemTransformers will be chained to produce a composite transformation.
+ * @param itemTransformers will be chained to produce a composite
+ * transformation.
*/
- public void setItemTransformers(List itemTransformers) {
+ public void setItemTransformers(List itemTransformers) {
this.itemTransformers = itemTransformers;
}
diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/validator/SpringValidator.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/validator/SpringValidator.java
index d33981d99..28c3eaacf 100644
--- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/validator/SpringValidator.java
+++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/validator/SpringValidator.java
@@ -17,7 +17,6 @@
package org.springframework.batch.item.validator;
import java.util.Collection;
-import java.util.Iterator;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
@@ -70,10 +69,10 @@ public class SpringValidator implements Validator, InitializingBean {
* Append the string representation of elements of the collection (separated
* by new lines) to the given StringBuilder.
*/
- private void appendCollection(Collection collection, StringBuffer builder) {
- for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
+ private void appendCollection(Collection> collection, StringBuffer builder) {
+ for (Object value : collection) {
builder.append("\n");
- builder.append(iterator.next().toString());
+ builder.append(value.toString());
}
}
diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxEventItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxEventItemWriter.java
index 5eeb36549..4935a4d20 100644
--- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxEventItemWriter.java
+++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxEventItemWriter.java
@@ -81,7 +81,7 @@ public class StaxEventItemWriter extends ExecutionContextUserSupport implements
private String rootTagName = DEFAULT_ROOT_TAG_NAME;
// root element attributes
- private Map rootElementAttributes = null;
+ private Map rootElementAttributes = null;
// signalizes that marshalling was restarted
private boolean restarted = false;
@@ -113,9 +113,9 @@ public class StaxEventItemWriter extends ExecutionContextUserSupport implements
// holds the list of items for writing before they are actually written on
// #flush()
- private List buffer = new ArrayList();
+ private List