mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-23 14:04:16 +00:00
Compare commits
2 Commits
fca4d7459c
...
f1de69d7ff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1de69d7ff | ||
|
|
ba2214d8c7 |
@ -7,8 +7,10 @@ java {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_21
|
sourceCompatibility = JavaVersion.VERSION_21
|
||||||
targetCompatibility = JavaVersion.VERSION_21
|
targetCompatibility = JavaVersion.VERSION_21
|
||||||
|
|
||||||
toolchain {
|
if (!JavaVersion.current().isCompatibleWith(targetCompatibility)) {
|
||||||
languageVersion.set(JavaLanguageVersion.of(21))
|
toolchain {
|
||||||
|
languageVersion.set(JavaLanguageVersion.of(targetCompatibility.majorVersion))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -160,9 +160,10 @@ public class Utils {
|
|||||||
return NetworkResultUtil.toBasicLegacy(response);
|
return NetworkResultUtil.toBasicLegacy(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static <T, E extends BadRequestError> T handleResponseException(final RequestResult<T, E> result) throws IOException {
|
public static <T, E extends BadRequestError> T handleResponseException(final RequestResult<T, E> result) throws IOException {
|
||||||
if (result instanceof RequestResult.Success) {
|
if (result instanceof RequestResult.Success<?> success) {
|
||||||
return ((RequestResult.Success<T>) result).getResult();
|
return ((RequestResult.Success<T>) success).getResult();
|
||||||
} else if (result instanceof RequestResult.ApplicationError e) {
|
} else if (result instanceof RequestResult.ApplicationError e) {
|
||||||
final var cause = e.getCause();
|
final var cause = e.getCause();
|
||||||
switch (cause) {
|
switch (cause) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user