Removing dependencies on ConfigurationException.

This commit is contained in:
Mark Fisher
2008-10-10 00:57:05 +00:00
parent 01c9efef66
commit b68f7ca17a
9 changed files with 35 additions and 56 deletions

View File

@@ -22,7 +22,6 @@ import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import org.springframework.integration.ConfigurationException;
import org.springframework.integration.message.MessageSource;
import org.springframework.integration.message.MessagingException;
import org.springframework.integration.message.StringMessage;
@@ -84,7 +83,7 @@ public class CharacterStreamSource implements MessageSource<String> {
return new CharacterStreamSource(new InputStreamReader(System.in, charsetName));
}
catch (UnsupportedEncodingException e) {
throw new ConfigurationException("unsupported encoding: " + charsetName, e);
throw new IllegalArgumentException("unsupported encoding: " + charsetName, e);
}
}

View File

@@ -26,7 +26,6 @@ import java.io.Writer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.ConfigurationException;
import org.springframework.integration.message.Message;
import org.springframework.integration.message.MessageConsumer;
import org.springframework.integration.message.MessagingException;
@@ -108,7 +107,7 @@ public class CharacterStreamWritingMessageConsumer implements MessageConsumer {
return new CharacterStreamWritingMessageConsumer(new OutputStreamWriter(stream, charsetName));
}
catch (UnsupportedEncodingException e) {
throw new ConfigurationException("unsupported encoding: " + charsetName, e);
throw new IllegalArgumentException("unsupported encoding: " + charsetName, e);
}
}