001/*002 * Copyright 2015 the original author or authors.003 *004 * Licensed under the Apache License, Version 2.0 (the "License");005 * you may not use this file except in compliance with the License.006 * You may obtain a copy of the License at007 *008 * https://www.apache.org/licenses/LICENSE-2.0009 *010 * Unless required by applicable law or agreed to in writing, software011 * distributed under the License is distributed on an "AS IS" BASIS,012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.013 * See the License for the specific language governing permissions and014 * limitations under the License.015 */016package org.springframework.batch.item.support;017018import org.springframework.batch.item.ExecutionContext;019import org.springframework.batch.item.ItemStreamReader;020import org.springframework.batch.item.NonTransientResourceException;021import org.springframework.batch.item.ParseException;022import org.springframework.batch.item.UnexpectedInputException;023import org.springframework.beans.factory.InitializingBean;024import org.springframework.util.Assert;025026/**027 * 028 * This is a simple ItemStreamReader decorator with a synchronized ItemReader.read() 029 * method - which makes a non-thread-safe ItemReader thread-safe.030 * 031 * However, if reprocessing an item is problematic then using this will make a job not032