Skip to content

Commit

Permalink
Update old school @exception with new school @throws.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/chain/trunk@1747104 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
garydgregory committed Jun 7, 2016
1 parent def8de6 commit 3c9f548
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 42 deletions.
6 changes: 3 additions & 3 deletions api/src/main/java/org/apache/commons/chain2/Chain.java
Expand Up @@ -66,9 +66,9 @@ public interface Chain<K, V, C extends Map<K, V>> extends Command<K, V, C> {
* @param <CMD> the {@link Command} type to be added in the {@link Chain}
* @param command The {@link Command} to be added
*
* @exception IllegalArgumentException if <code>command</code>
* @throws IllegalArgumentException if <code>command</code>
* is <code>null</code>
* @exception IllegalStateException if this {@link Chain} has already
* @throws IllegalStateException if this {@link Chain} has already
* been executed at least once, so no further configuration is allowed
*/
<CMD extends Command<K, V, C>> void addCommand(CMD command);
Expand Down Expand Up @@ -103,7 +103,7 @@ public interface Chain<K, V, C extends Map<K, V>> extends Command<K, V, C> {
* @param context The {@link Context} to be processed by this
* {@link Chain}
*
* @exception IllegalArgumentException if <code>context</code>
* @throws IllegalArgumentException if <code>context</code>
* is <code>null</code>
*
* @return {@link Processing#FINISHED} if the processing of this context
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/org/apache/commons/chain2/Command.java
Expand Up @@ -94,9 +94,9 @@ public interface Command<K, V, C extends Map<K, V>> {
* @param context The {@link Context} to be processed by this
* {@link Command}
*
* @exception ChainException general purpose exception return
* @throws ChainException general purpose exception return
* to indicate abnormal termination
* @exception IllegalArgumentException if <code>context</code>
* @throws IllegalArgumentException if <code>context</code>
* is <code>null</code>
*
* @return {@link Processing#FINISHED} if the processing of this contex
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/org/apache/commons/chain2/Filter.java
Expand Up @@ -57,7 +57,7 @@ public interface Filter<K, V, C extends Map<K, V>> extends Command<K, V, C> {
* by the last {@link Command} that was executed; otherwise
* <code>null</code>
*
* @exception IllegalArgumentException if <code>context</code>
* @throws IllegalArgumentException if <code>context</code>
* is <code>null</code>
*
* @return If a non-null <code>exception</code> was "handled" by this
Expand Down
Expand Up @@ -49,7 +49,7 @@ public class ExampleServlet extends HttpServlet {
/**
* <p>Cache the name of the servlet.</p>
*
* @exception ServletException if an initialization error occurs
* @throws ServletException if an initialization error occurs
*/
public void init() throws ServletException {
super.init();
Expand All @@ -69,7 +69,7 @@ public void init() throws ServletException {
* @param request The request we are processing
* @param response The response we are creating
*
* @exception IOException if an input/output error occurs
* @throws IOException if an input/output error occurs
*/
public void service(HttpServletRequest request,
HttpServletResponse response)
Expand Down
Expand Up @@ -263,7 +263,7 @@ public void setIgnorePostprocessResult(boolean ignorePostprocessResult) {
*
* @param context The context for this request
*
* @exception IllegalArgumentException if no such {@link Command}
* @throws IllegalArgumentException if no such {@link Command}
* can be found and the <code>optional</code> property is set
* to <code>false</code>
* @return the result of executing the looked-up command, or
Expand Down Expand Up @@ -316,7 +316,7 @@ public boolean postprocess(C context, Exception exception) {
*
* @param context {@link Context} for this request
* @return The catalog.
* @exception IllegalArgumentException if no {@link Catalog}
* @throws IllegalArgumentException if no {@link Catalog}
* can be found
*
* @since Chain 1.2
Expand Down Expand Up @@ -353,7 +353,7 @@ protected Catalog<K, V, C> getCatalog(C context) {
*
* @param context {@link Context} for this request
* @return The looked-up Command.
* @exception IllegalArgumentException if no such {@link Command}
* @throws IllegalArgumentException if no such {@link Command}
* can be found and the <code>optional</code> property is set
* to <code>false</code>
*/
Expand Down
Expand Up @@ -59,7 +59,7 @@ public CatalogBase() { }
*
* @param commands Map of Commands.
*
* @exception IllegalArgumentException if <code>commands</code>
* @throws IllegalArgumentException if <code>commands</code>
* is <code>null</code>
*
* @since Chain 1.1
Expand Down
10 changes: 5 additions & 5 deletions base/src/main/java/org/apache/commons/chain2/impl/ChainBase.java
Expand Up @@ -53,7 +53,7 @@ public ChainBase() {
*
* @param command The {@link Command} to be configured
*
* @exception IllegalArgumentException if <code>command</code>
* @throws IllegalArgumentException if <code>command</code>
* is <code>null</code>
*/
public ChainBase(Command<K, V, C> command) {
Expand All @@ -66,7 +66,7 @@ public ChainBase(Command<K, V, C> command) {
*
* @param commands The {@link Command Commands} to be configured
*
* @exception IllegalArgumentException if <code>commands</code>,
* @throws IllegalArgumentException if <code>commands</code>,
* or one of the individual {@link Command} elements,
* is <code>null</code>
*/
Expand All @@ -85,7 +85,7 @@ public ChainBase(Command<K, V, C>... commands) {
*
* @param commands The {@link Command}s to be configured
*
* @exception IllegalArgumentException if <code>commands</code>,
* @throws IllegalArgumentException if <code>commands</code>,
* or one of the individual {@link Command} elements,
* is <code>null</code>
*/
Expand Down Expand Up @@ -121,9 +121,9 @@ public ChainBase(Collection<Command<K, V, C>> commands) {
* @param <CMD> the {@link Command} type to be added in the {@link Chain}
* @param command The {@link Command} to be added
*
* @exception IllegalArgumentException if <code>command</code>
* @throws IllegalArgumentException if <code>command</code>
* is <code>null</code>
* @exception IllegalStateException if no further configuration is allowed
* @throws IllegalStateException if no further configuration is allowed
*/
public <CMD extends Command<K, V, C>> void addCommand(CMD command) {
if (command == null) {
Expand Down
34 changes: 17 additions & 17 deletions base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
Expand Up @@ -72,9 +72,9 @@ public ContextBase() {
*
* @param map Map whose key-value pairs are added
*
* @exception IllegalArgumentException if an exception is thrown
* @throws IllegalArgumentException if an exception is thrown
* writing a local property value
* @exception UnsupportedOperationException if a local property does not
* @throws UnsupportedOperationException if a local property does not
* have a write method.
*/
public ContextBase(Map<? extends String, ? extends Object> map) {
Expand Down Expand Up @@ -162,7 +162,7 @@ public void clear() {
* @param value the value look for in the context.
* @return <code>true</code> if found in this context otherwise
* <code>false</code>.
* @exception IllegalArgumentException if a property getter
* @throws IllegalArgumentException if a property getter
* throws an exception
*/
@Override
Expand Down Expand Up @@ -219,9 +219,9 @@ public Set<Entry<String, Object>> entrySet() {
* @param key Key of the value to be returned
* @return The value for the specified key.
*
* @exception IllegalArgumentException if an exception is thrown
* @throws IllegalArgumentException if an exception is thrown
* reading this local property value
* @exception UnsupportedOperationException if this local property does not
* @throws UnsupportedOperationException if this local property does not
* have a read method.
*/
@Override
Expand Down Expand Up @@ -289,9 +289,9 @@ public Set<String> keySet() {
* @param value New value to be stored
* @return The value added to the Context.
*
* @exception IllegalArgumentException if an exception is thrown
* @throws IllegalArgumentException if an exception is thrown
* reading or writing this local property value
* @exception UnsupportedOperationException if this local property does not
* @throws UnsupportedOperationException if this local property does not
* have both a read method and a write method
*/
@Override
Expand Down Expand Up @@ -338,9 +338,9 @@ public Object put(String key, Object value) {
* @param map <code>Map</code> containing key-value pairs to store
* (or replace)
*
* @exception IllegalArgumentException if an exception is thrown
* @throws IllegalArgumentException if an exception is thrown
* reading or writing a local property value
* @exception UnsupportedOperationException if a local property does not
* @throws UnsupportedOperationException if a local property does not
* have both a read method and a write method
*/
@Override
Expand All @@ -358,7 +358,7 @@ public void putAll(Map<? extends String, ? extends Object> map) {
* @param key Key to be removed
* @return The value removed from the Context.
*
* @exception UnsupportedOperationException if the specified
* @throws UnsupportedOperationException if the specified
* <code>key</code> matches the name of a local property
*/
@Override
Expand Down Expand Up @@ -424,9 +424,9 @@ private Map.Entry<String, Object> entry(String key) {
* the {@link Context} implementation class.</p>
*
*
* @exception IllegalArgumentException if an exception is thrown
* @throws IllegalArgumentException if an exception is thrown
* writing this local property value
* @exception UnsupportedOperationException if this local property does not
* @throws UnsupportedOperationException if this local property does not
* have a write method.
*/
private void initialize() {
Expand Down Expand Up @@ -459,9 +459,9 @@ private void initialize() {
* @param descriptor <code>PropertyDescriptor</code> for the
* specified property
*
* @exception IllegalArgumentException if an exception is thrown
* @throws IllegalArgumentException if an exception is thrown
* reading this local property value
* @exception UnsupportedOperationException if this local property does not
* @throws UnsupportedOperationException if this local property does not
* have a read method.
*/
private Object readProperty(PropertyDescriptor descriptor) {
Expand All @@ -487,7 +487,7 @@ private Object readProperty(PropertyDescriptor descriptor) {
*
* @param entry Key-value pair to be removed
*
* @exception UnsupportedOperationException if the specified key
* @throws UnsupportedOperationException if the specified key
* identifies a property instead of an attribute
*/
private boolean remove(Map.Entry<String, Object> entry) {
Expand Down Expand Up @@ -518,9 +518,9 @@ private Iterator<Object> valuesIterator() {
* @param value The new value for this property (must be of the
* correct type)
*
* @exception IllegalArgumentException if an exception is thrown
* @throws IllegalArgumentException if an exception is thrown
* writing this local property value
* @exception UnsupportedOperationException if this local property does not
* @throws UnsupportedOperationException if this local property does not
* have a write method.
*/
private void writeProperty(PropertyDescriptor descriptor, Object value) {
Expand Down
Expand Up @@ -47,7 +47,7 @@ public interface ConfigParser {
* @param <C> Type of the context associated with this command
* @param url <code>URL</code> of the configuration document to be parsed
* @return a CatalogFactory instance parsed from the given location
* @exception ChainConfigurationException if a parsing error occurs
* @throws ChainConfigurationException if a parsing error occurs
*/
<K, V, C extends Map<K, V>> CatalogFactory<K, V, C> parse(URL url) throws ChainConfigurationException;

Expand Down
Expand Up @@ -145,7 +145,7 @@ public void setUseContextClassLoader(boolean useContextClassLoader) {
* @param <C> Type of the context associated with this command
* @param url <code>URL</code> of the XML document to be parsed
* @return a CatalogFactory instance parsed from the given location
* @exception ChainConfigurationException if a parsing error occurs
* @throws ChainConfigurationException if a parsing error occurs
*/
public <K, V, C extends Map<K, V>> CatalogFactory<K, V, C> parse(URL url) {
// Prepare our Digester instance
Expand Down
Expand Up @@ -132,7 +132,7 @@ public void destroy() {
/**
* <p>Cache the name of the command we should execute for each request.</p>
*
* @exception ServletException if an initialization error occurs
* @throws ServletException if an initialization error occurs
*/
@Override
public void init() throws ServletException {
Expand All @@ -153,8 +153,8 @@ public void init() throws ServletException {
* @param request The request we are processing
* @param response The response we are creating
*
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet exception occurs
* @throws IOException if an input/output error occurs
* @throws ServletException if a servlet exception occurs
*/
@Override
public void service(HttpServletRequest request, HttpServletResponse response)
Expand Down
Expand Up @@ -65,7 +65,7 @@ protected String getCommandName(ServletWebContext<String, Object> context) {
*
* @param context {@link Context} for this request
* @return The catalog.
* @exception IllegalArgumentException if no {@link Catalog}
* @throws IllegalArgumentException if no {@link Catalog}
* can be found
*
* @since Chain 1.2
Expand Down
Expand Up @@ -90,7 +90,7 @@ protected String getCommandName(ServletWebContext context) {
*
* @param context {@link Context} for this request
* @return The catalog.
* @exception IllegalArgumentException if no {@link Catalog}
* @throws IllegalArgumentException if no {@link Catalog}
* can be found
*
* @since Chain 1.2
Expand Down
Expand Up @@ -65,7 +65,7 @@ protected String getCommandName(ServletWebContext<String, Object> swcontext) {
*
* @param context {@link Context} for this request
* @return The catalog.
* @exception IllegalArgumentException if no {@link Catalog}
* @throws IllegalArgumentException if no {@link Catalog}
* can be found
*
* @since Chain 1.2
Expand Down

0 comments on commit 3c9f548

Please sign in to comment.