summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-04-30 10:49:11 -0700
committerAndreas Gampe <agampe@google.com>2015-05-01 18:26:16 -0700
commite912fd64f9f086d256651cf495c607f9dbcc7ff9 (patch)
tree09b27f9a34aad0726116d3c102d33a3aa3231aa1
parent1bc6f080c77deb3cc53d55ec60c98167ea093911 (diff)
downloadlibcore-e912fd64f9f086d256651cf495c607f9dbcc7ff9.zip
libcore-e912fd64f9f086d256651cf495c607f9dbcc7ff9.tar.gz
libcore-e912fd64f9f086d256651cf495c607f9dbcc7ff9.tar.bz2
Libcore: Correct IllegalAccessError class javadoc
IllegalAccessError can be thrown in more than one case. Correct the class documentation to be general, and state example cases of the error. Bug: 19997575 Change-Id: I8b14d8b2fcd77f547d377bec2eecc326743fb671
-rw-r--r--luni/src/main/java/java/lang/IllegalAccessError.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/luni/src/main/java/java/lang/IllegalAccessError.java b/luni/src/main/java/java/lang/IllegalAccessError.java
index 3f7cf86..582de12 100644
--- a/luni/src/main/java/java/lang/IllegalAccessError.java
+++ b/luni/src/main/java/java/lang/IllegalAccessError.java
@@ -18,8 +18,14 @@
package java.lang;
/**
- * Thrown when the VM notices that a program tries access a field
- * which is not accessible from where it is referenced.
+ * Thrown when the runtime notices that a program tries to access a class or member
+ * which is not accessible from where it is referenced. Some examples are:
+ * <ul>
+ * <li>The superclass or an implemented interface is not accessible in the subclass.
+ * <li>Reading or writing an inaccessible field, e.g., a private field in another class.
+ * <li>Invoking an inaccessible method, e.g., the constructor of an inaccessible class,
+ * or a private method of another class.
+ * </ul>
* <p>
* Note that this can only occur when inconsistent class files have been loaded.
*/