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

Commit aa32c30b authored by Jeff Brown's avatar Jeff Brown
Browse files

Restore broken CursorWindow.getType behavior.

Bug: 5430009

Some CTS tests try to call getType on fields in empty
cursor windows or with out of bound column indices (-1).
Restoring the previous behavior of returning FIELD_TYPE_NULL
instead of throwing.  Fix this later.

Change-Id: I782bd02012474e7dabc5bb7ea2dc45e8b0c7ef25
parent 3bc6bbc9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -147,8 +147,10 @@ static jint nativeGetType(JNIEnv* env, jclass clazz, jint windowPtr,

    field_slot_t* fieldSlot = window->getFieldSlotWithCheck(row, column);
    if (!fieldSlot) {
        throwExceptionWithRowCol(env, row, column);
        return NULL;
        // FIXME: This is really broken but we have CTS tests that depend
        // on this legacy behavior.
        //throwExceptionWithRowCol(env, row, column);
        return FIELD_TYPE_NULL;
    }
    return fieldSlot->type;
}