From 879ea451cefa535803d9742506cf51e2e0df75a7 Mon Sep 17 00:00:00 2001 From: Mark Doliner Date: Thu, 2 Jan 2014 12:38:07 -0800 Subject: [PATCH] Fix documentation for Parcel.readException(). The old documentation was kind of useless and not clear, so this is an improvement. In addition to this change, I think this method should probably be private instead of public, especially since the values for code are private. But it's too late to change that now. Also the method name is pretty poor, since it's not actually reading anything. Something like "throwException" would be more appropriate. I'm open to suggestions on how to improve this situation. Maybe mark the method as deprecated with a comment that it will be made private in the future? Change-Id: I830f2bcf606714bd130d8c953aa33974b33c9a83 --- core/java/android/os/Parcel.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index 94b961793e267..51e46bc3a9fd8 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -1454,10 +1454,11 @@ public final class Parcel { } /** - * Use this function for customized exception handling. - * customized method call this method for all unknown case - * @param code exception code - * @param msg exception message + * Throw an exception with the given message. Not intended for use + * outside the Parcel class. + * + * @param code Used to determine which exception class to throw. + * @param msg The exception message. */ public final void readException(int code, String msg) { switch (code) {