Author: niallp
Date: Sun Nov 5 20:05:27 2006
New Revision: 471627
URL: http://svn.apache.org/viewvc?view=rev&rev=471627
Log:
BEANUTILS-256 - Correct PropertyUtils javadoc to indicate the more general
IndexOutOufBoundsException can be thrown (rather than just
ArrayIndexOutOufBoundsException) - also re-throw any IndexOutOufBoundsException
wrapped in an InvocationTargetException rather than just
ArrayIndexOutOufBoundsException - thanks to Torsten Feig
Modified:
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtils.java
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java
Modified:
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtils.java
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtils.java?view=diff&rev=471627&r1=471626&r2=471627
==============================================================================
---
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtils.java
(original)
+++
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtils.java
Sun Nov 5 20:05:27 2006
@@ -201,8 +201,8 @@
* to be extracted
* @return the indexed property value
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying property
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
@@ -233,8 +233,8 @@
* @param index Index of the property value to be extracted
* @return the indexed property value
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying property
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
@@ -667,8 +667,8 @@
* @param value Value to which the specified property element
* should be set
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying property
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
@@ -700,8 +700,8 @@
* @param index Index of the property value to be set
* @param value Value to which the indexed property element is to be set
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying property
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
Modified:
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java?view=diff&rev=471627&r1=471626&r2=471627
==============================================================================
---
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java
(original)
+++
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java
Sun Nov 5 20:05:27 2006
@@ -306,8 +306,8 @@
* to be extracted
* @return the indexed property value
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying array or List
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
@@ -362,8 +362,8 @@
* @param index Index of the property value to be extracted
* @return the indexed property value
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying property
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
@@ -415,8 +415,8 @@
return (invokeMethod(readMethod,bean, subscript));
} catch (InvocationTargetException e) {
if (e.getTargetException() instanceof
- ArrayIndexOutOfBoundsException) {
- throw (ArrayIndexOutOfBoundsException)
+ IndexOutOfBoundsException) {
+ throw (IndexOutOfBoundsException)
e.getTargetException();
} else {
throw e;
@@ -1415,8 +1415,8 @@
* @param value Value to which the specified property element
* should be set
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying property
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
@@ -1472,8 +1472,8 @@
* @param index Index of the property value to be set
* @param value Value to which the indexed property element is to be set
*
- * @exception ArrayIndexOutOfBoundsException if the specified index
- * is outside the valid range for the underlying array
+ * @exception IndexOutOfBoundsException if the specified index
+ * is outside the valid range for the underlying property
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception IllegalArgumentException if <code>bean</code> or
@@ -1536,8 +1536,8 @@
invokeMethod(writeMethod, bean, subscript);
} catch (InvocationTargetException e) {
if (e.getTargetException() instanceof
- ArrayIndexOutOfBoundsException) {
- throw (ArrayIndexOutOfBoundsException)
+ IndexOutOfBoundsException) {
+ throw (IndexOutOfBoundsException)
e.getTargetException();
} else {
throw e;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]