Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0278f30 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Merge "Only construct real Throwable objects." into oc-dev

am: 08685337

Change-Id: I260dc1d1c903f1c1c2828d68049f9f202daa0869
parents 46181531 08685337
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -52,10 +52,12 @@ public final class ParcelableException extends RuntimeException implements Parce
        final String msg = in.readString();
        try {
            final Class<?> clazz = Class.forName(name, true, Parcelable.class.getClassLoader());
            if (Throwable.class.isAssignableFrom(clazz)) {
                return (Throwable) clazz.getConstructor(String.class).newInstance(msg);
            }
        } catch (ReflectiveOperationException e) {
            throw new RuntimeException(name + ": " + msg);
        }
        return new RuntimeException(name + ": " + msg);
    }

    /** {@hide} */