diff --git a/src/java/org/apache/commons/lang/builder/EqualsBuilder.java b/src/java/org/apache/commons/lang/builder/EqualsBuilder.java index 76be3656a..8899ca720 100644 --- a/src/java/org/apache/commons/lang/builder/EqualsBuilder.java +++ b/src/java/org/apache/commons/lang/builder/EqualsBuilder.java @@ -53,6 +53,7 @@ */ package org.apache.commons.lang.builder; +import java.lang.reflect.AccessibleObject; import java.lang.reflect.Field; import java.lang.reflect.Modifier; /** @@ -92,7 +93,7 @@ * *
Alternatively, there is a method that uses reflection to determine
* the fields to test. Because these fields are usually private, the method,
- * reflectionEquals
, uses Field.setAccessible
to
+ * reflectionEquals
, uses AccessibleObject.setAccessible
to
* change the visibility of the fields. This will fail under a security
* manager, unless the appropriate permissions are set up correctly. It is
* also slower than testing explicitly.
This method uses reflection to determine if the two Object
s
* are equal.
It uses Field.setAccessible
to gain access to private
+ *
It uses AccessibleObject.setAccessible
to gain access to private
* fields. This means that it will throw a security exception if run under
* a security manger, if the permissions are not set up correctly. It is also
* not as efficient as testing explicitly.
This method uses reflection to determine if the two Object
s
* are equal.
It uses Field.setAccessible
to gain access to private
+ *
It uses AccessibleObject.setAccessible
to gain access to private
* fields. This means that it will throw a security exception if run under
* a security manger, if the permissions are not set up correctly. It is also
* not as efficient as testing explicitly.
This method uses reflection to determine if the two Object
s
* are equal.
It uses Field.setAccessible
to gain access to private
+ *
It uses AccessibleObject.setAccessible
to gain access to private
* fields. This means that it will throw a security exception if run under
* a security manger, if the permissions are not set up correctly. It is also
* not as efficient as testing explicitly.