Код: Выделить всё
public final class Rect implements Parcelable {
@NonNull
public static final Parcelable.Creator CREATOR = null;
public int bottom;
public int left;
public int right;
public int top;
public Rect() {
throw new RuntimeException("Stub!");
}
public Rect(int left, int top, int right, int bottom) {
throw new RuntimeException("Stub!");
}
public Rect(@Nullable Rect r) {
throw new RuntimeException("Stub!");
}
public boolean equals(Object o) {
throw new RuntimeException("Stub!");
}
public int hashCode() {
throw new RuntimeException("Stub!");
}
public String toString() {
throw new RuntimeException("Stub!");
}
@NonNull
public String toShortString() {
throw new RuntimeException("Stub!");
}
@NonNull
public String flattenToString() {
throw new RuntimeException("Stub!");
}
//....
}
Вопрос в том, в чем причина такого поведения? Неверен ли вывод декомпилятора или почему конструктор не бросается, как и ожидалось? /> Обновление: < /strong>
Я также заметил, что если я запускаю тест с заглушкой Gradle Configuration! Исключение не отброшено из конструктора, но если я запускаю тест с конфигурацией Kotest, оно брошено, как и ожидалось.
Подробнее здесь: https://stackoverflow.com/questions/762 ... alled-from