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

Commit 76010492 authored by Ray Essick's avatar Ray Essick
Browse files

Stop using return within finally

Refactor code to avoid a return statement inside a finally block. Such
constructs interfere with exception propagation in non-obvious ways
and are therefore considered bad practice.

Bug: 32586420
Test: manual code walk
parent 6054a30a
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -530,14 +530,13 @@ public final class RadioMetadata implements Parcelable {
        Bitmap bmp = null;
        try {
            bmp = BitmapFactory.decodeByteArray(value, 0, value.length);
        } catch (Exception e) {
        } finally {
            if (bmp == null) {
                return -1;
            }
            if (bmp != null) {
                mBundle.putParcelable(key, bmp);
                return 0;
            }
        } catch (Exception e) {
        }
        return -1;
    }

    int putClockFromNative(int nativeKey, long utcEpochSeconds, int timezoneOffsetInMinutes) {