summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorHao Ke <haok@google.com>2021-10-14 17:47:17 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-10-14 17:47:17 +0000
commitce08bacce074bb7c3370982b2bba366a1623fc84 (patch)
tree7f28b87a7ecf1f70f5c7510503ad5311ca73420e /core/java/android
parent63013a442b7b6b5c2420189adaf4d0bf4a09db26 (diff)
parentd6f306117ae252763093b5ecdf013e47364503a3 (diff)
Merge "Add “@throws BadParcelableException” to the JavaDoc of new API methods that throw the exception." am: d6f306117a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1857934 Change-Id: Ie91b63142355e26dc5e27216ac9f53a4ebe492d3
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/Parcel.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index fa578be0c984..6be86da9a925 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -2891,9 +2891,11 @@ public final class Parcel {
/**
* Same as {@link #readList(List, ClassLoader)} but accepts {@code clazz} parameter as
- * the type required for each item. If the item to be deserialized is not an instance
- * of that class or any of its children class
- * a {@link BadParcelableException} will be thrown.
+ * the type required for each item.
+ *
+ * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
+ * is not an instance of that class or any of its children classes or there was an error
+ * trying to instantiate an element.
*/
public <T> void readList(@NonNull List<? super T> outVal,
@Nullable ClassLoader loader, @NonNull Class<T> clazz) {
@@ -3894,8 +3896,11 @@ public final class Parcel {
/**
* Same as {@link #readParcelable(ClassLoader)} but accepts {@code clazz} parameter as the type
- * required for each item. If the item to be deserialized is not an instance of that class or
- * any of its children classes a {@link BadParcelableException} will be thrown.
+ * required for each item.
+ *
+ * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
+ * is not an instance of that class or any of its children classes or there was an error
+ * trying to instantiate an element.
*/
@Nullable
public <T extends Parcelable> T readParcelable(@Nullable ClassLoader loader,
@@ -3961,8 +3966,11 @@ public final class Parcel {
/**
* Same as {@link #readParcelableCreator(ClassLoader)} but accepts {@code clazz} parameter
- * as the required type. If the item to be deserialized is not an instance of that class
- * or any of its children classes a {@link BadParcelableException} will be thrown.
+ * as the required type.
+ *
+ * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
+ * is not an instance of that class or any of its children class or there there was an error
+ * trying to read the {@link Parcelable.Creator}.
*/
@Nullable
public <T> Parcelable.Creator<T> readParcelableCreator(