refactor(merge,split,json): adopt streaming approach and standardize types, address gradle warnings (#5803)

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
Co-authored-by: Balázs <balazs@heim-041-30.jkh.uni-linz.ac.at>
This commit is contained in:
Balázs Szücs
2026-03-02 22:55:07 +01:00
committed by GitHub
parent 0c46f77179
commit fd1b7abc83
66 changed files with 1425 additions and 1430 deletions

View File

@@ -49,7 +49,7 @@ public enum AuditEventType {
// If the exact enum name doesn't match, try finding a similar one
for (AuditEventType eventType : values()) {
if (eventType.name().equalsIgnoreCase(type)
|| eventType.getDescription().equalsIgnoreCase(type)) {
|| eventType.description.equalsIgnoreCase(type)) {
return eventType;
}
}

View File

@@ -35,7 +35,7 @@ public class SignatureService implements PersonalSignatureServiceInterface {
private static final Pattern FILENAME_VALIDATION_PATTERN = Pattern.compile("^[a-zA-Z0-9_.-]+$");
private final String SIGNATURE_BASE_PATH;
private final String ALL_USERS_FOLDER = "ALL_USERS";
private static final String ALL_USERS_FOLDER = "ALL_USERS";
private final ObjectMapper objectMapper;
// Storage limits per user
@@ -115,7 +115,7 @@ public class SignatureService implements PersonalSignatureServiceInterface {
}
// Extract base64 data
String base64Data = dataUrl.substring(dataUrl.indexOf(",") + 1);
String base64Data = dataUrl.substring(dataUrl.indexOf(',') + 1);
byte[] imageBytes = Base64.getDecoder().decode(base64Data);
// Validate decoded size
@@ -127,8 +127,8 @@ public class SignatureService implements PersonalSignatureServiceInterface {
}
// Determine and validate file extension from data URL
String mimeType = dataUrl.substring(dataUrl.indexOf(":") + 1, dataUrl.indexOf(";"));
String rawExtension = mimeType.substring(mimeType.indexOf("/") + 1);
String mimeType = dataUrl.substring(dataUrl.indexOf(':') + 1, dataUrl.indexOf(';'));
String rawExtension = mimeType.substring(mimeType.indexOf('/') + 1);
String extension = validateAndNormalizeExtension(rawExtension);
// Save image file