Fix graalvm issue with image dimension probing

Fixes #2096
This commit is contained in:
AsamK 2026-08-04 13:16:58 +02:00
parent f8ea8ed314
commit 85580d1ff6

View File

@ -79,7 +79,7 @@ public class AttachmentUtils {
height = image.getHeight();
}
fis.getChannel().position(0);
} catch (IOException e) {
} catch (IOException | LinkageError e) {
logger.debug("Failed to probe image dimensions, sending without width/height: {}", e.getMessage());
fis.getChannel().position(0);
}
@ -93,7 +93,7 @@ public class AttachmentUtils {
width = image.getWidth();
height = image.getHeight();
}
} catch (IOException e) {
} catch (IOException | LinkageError e) {
logger.debug("Failed to probe image dimensions, sending without width/height: {}", e.getMessage());
}
return new ProbedStream(new ByteArrayInputStream(bytes), width, height);