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

Commit 2c56bb54 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

am: f0278f30

Change-Id: I3a7cbb7cad2c9663e4f7aa2e583ef5707cf6bbc2
parents 00579bd4 f0278f30
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} */