Java 25+ is now required

This commit is contained in:
Athou
2026-01-05 07:19:27 +01:00
parent f7505298d7
commit 19663b0f38
11 changed files with 33 additions and 33 deletions

View File

@@ -178,7 +178,7 @@ public class CategoryREST {
boolean hasMore = entries.getEntries().size() > limit;
if (hasMore) {
entries.setHasMore(true);
entries.getEntries().remove(entries.getEntries().size() - 1);
entries.getEntries().removeLast();
}
entries.setTimestamp(System.currentTimeMillis());

View File

@@ -94,8 +94,8 @@ public class FeverREST {
@Operation(hidden = true)
public FeverResponse formUrlencoded(@Context UriInfo uri, @PathParam("userId") Long userId, MultivaluedMap<String, String> form) {
Map<String, String> params = new HashMap<>();
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.get(0)));
form.forEach((k, v) -> params.put(k, v.get(0)));
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.getFirst()));
form.forEach((k, v) -> params.put(k, v.getFirst()));
return handle(userId, params);
}
@@ -107,7 +107,7 @@ public class FeverREST {
@Operation(hidden = true)
public FeverResponse noForm(@Context UriInfo uri, @PathParam("userId") Long userId) {
Map<String, String> params = new HashMap<>();
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.get(0)));
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.getFirst()));
return handle(userId, params);
}
@@ -119,7 +119,7 @@ public class FeverREST {
@Operation(hidden = true)
public FeverResponse get(@Context UriInfo uri, @PathParam("userId") Long userId) {
Map<String, String> params = new HashMap<>();
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.get(0)));
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.getFirst()));
return handle(userId, params);
}
@@ -132,7 +132,7 @@ public class FeverREST {
@Operation(hidden = true)
public FeverResponse formData(@Context UriInfo uri, @PathParam("userId") Long userId, MultipartFormDataInput form) {
Map<String, String> params = new HashMap<>();
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.get(0)));
uri.getQueryParameters().forEach((k, v) -> params.put(k, v.getFirst()));
form.getValues().forEach((k, v) -> params.put(k, v.stream().map(FormValue::getValue).findFirst().orElse(null)));
return handle(userId, params);
}