Compare commits

..

No commits in common. "f1de69d7ff26a29885de0b5fe3bf605347c4a477" and "fca4d7459c8b69791b7aa1fc60a7fd6022f4fef4" have entirely different histories.

2 changed files with 4 additions and 7 deletions

View File

@ -7,10 +7,8 @@ java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
if (!JavaVersion.current().isCompatibleWith(targetCompatibility)) {
toolchain {
languageVersion.set(JavaLanguageVersion.of(targetCompatibility.majorVersion))
}
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

View File

@ -160,10 +160,9 @@ public class Utils {
return NetworkResultUtil.toBasicLegacy(response);
}
@SuppressWarnings("unchecked")
public static <T, E extends BadRequestError> T handleResponseException(final RequestResult<T, E> result) throws IOException {
if (result instanceof RequestResult.Success<?> success) {
return ((RequestResult.Success<T>) success).getResult();
if (result instanceof RequestResult.Success) {
return ((RequestResult.Success<T>) result).getResult();
} else if (result instanceof RequestResult.ApplicationError e) {
final var cause = e.getCause();
switch (cause) {