Loading core/java/android/os/Parcel.java +4 −4 Original line number Diff line number Diff line Loading @@ -593,11 +593,11 @@ public final class Parcel { */ public final void recycle() { if (mRecycled) { Log.wtf(TAG, "Recycle called on unowned Parcel. (recycle twice?) Here: " String error = "Recycle called on unowned Parcel. (recycle twice?) Here: " + Log.getStackTraceString(new Throwable()) + " Original recycle call (if DEBUG_RECYCLE): ", mStack); return; + " Original recycle call (if DEBUG_RECYCLE): "; Log.wtf(TAG, error, mStack); throw new IllegalStateException(error, mStack); } mRecycled = true; Loading core/tests/coretests/src/android/os/ParcelTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -361,7 +361,11 @@ public class ParcelTest { p.setClassCookie(ParcelTest.class, "to_be_discarded_cookie"); p.recycle(); assertThat(p.getClassCookie(ParcelTest.class)).isNull(); // cannot access Parcel after it's recycled! // this test is equivalent to checking hasClassCookie false // after obtaining above // assertThat(p.getClassCookie(ParcelTest.class)).isNull(); } @Test Loading Loading
core/java/android/os/Parcel.java +4 −4 Original line number Diff line number Diff line Loading @@ -593,11 +593,11 @@ public final class Parcel { */ public final void recycle() { if (mRecycled) { Log.wtf(TAG, "Recycle called on unowned Parcel. (recycle twice?) Here: " String error = "Recycle called on unowned Parcel. (recycle twice?) Here: " + Log.getStackTraceString(new Throwable()) + " Original recycle call (if DEBUG_RECYCLE): ", mStack); return; + " Original recycle call (if DEBUG_RECYCLE): "; Log.wtf(TAG, error, mStack); throw new IllegalStateException(error, mStack); } mRecycled = true; Loading
core/tests/coretests/src/android/os/ParcelTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -361,7 +361,11 @@ public class ParcelTest { p.setClassCookie(ParcelTest.class, "to_be_discarded_cookie"); p.recycle(); assertThat(p.getClassCookie(ParcelTest.class)).isNull(); // cannot access Parcel after it's recycled! // this test is equivalent to checking hasClassCookie false // after obtaining above // assertThat(p.getClassCookie(ParcelTest.class)).isNull(); } @Test Loading