File: no-IOException-OpenJdk17.patch

package info (click to toggle)
xmlgraphics-commons 2.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,424 kB
  • sloc: java: 36,384; xml: 2,240; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 920 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: no IOException is anymore thrown by write
 This can raise an error depending on the version of the JDK that is used.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2025-05-01

--- a/src/main/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
+++ b/src/main/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
@@ -226,11 +226,7 @@
             final int alignment = 4;
             int padding = (alignment - (iccStream.size() % alignment)) % alignment;
             if (padding != 0) {
-                try {
-                    iccStream.write(new byte[padding]);
-                } catch (IOException ioe) {
-                    throw new IOException("Error while aligning ICC stream: " + ioe.getMessage());
-                }
+                iccStream.write(new byte[padding]);
             }
 
             ICC_Profile iccProfile = null;