Skip to content

Commit

Permalink
Merge pull request #1486 from scireum/mke/SE-1036_lib_upgrades
Browse files Browse the repository at this point in the history
Upgrade library versions
  • Loading branch information
sabieber authored Dec 4, 2024
2 parents ac2578a + 01063b9 commit a82379e
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 39 deletions.
10 changes: 5 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ clone:

steps:
- name: compile
image: scireum/sirius-build-jdk22
image: scireum/sirius-build-jdk23
commands:
- mvn clean compile
volumes: *scireum_volumes
Expand All @@ -28,7 +28,7 @@ steps:
- push

- name: cron_unit_tests
image: scireum/sirius-build-jdk22
image: scireum/sirius-build-jdk23
commands:
- mvn clean test -Dsun.net.http.allowRestrictedHeaders=true
volumes: *scireum_volumes
Expand All @@ -48,7 +48,7 @@ steps:
- cron

- name: test
image: scireum/sirius-build-jdk22
image: scireum/sirius-build-jdk23
commands:
- mvn clean test -Dtest.excluded.groups=nightly -Dsun.net.http.allowRestrictedHeaders=true
volumes: *scireum_volumes
Expand All @@ -57,7 +57,7 @@ steps:
- pull_request

- name: deploy
image: scireum/sirius-build-jdk22
image: scireum/sirius-build-jdk23
commands:
- sed -i 's/DEVELOPMENT-SNAPSHOT/${DRONE_TAG}/g' pom.xml
- mvn clean deploy -DskipTests
Expand All @@ -77,7 +77,7 @@ steps:
- tag

- name: sonar
image: scireum/sirius-build-jdk22
image: scireum/sirius-build-jdk23
commands:
- sed -i 's/DEVELOPMENT-SNAPSHOT/${DRONE_TAG}/g' pom.xml
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report sonar:sonar -Dsonar.projectKey=${DRONE_REPO_NAME} -Dsun.net.http.allowRestrictedHeaders=true
Expand Down
30 changes: 9 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<parent>
<groupId>com.scireum</groupId>
<artifactId>sirius-parent</artifactId>
<version>12.1.1</version>
<version>13.0.0</version>
</parent>
<artifactId>sirius-web</artifactId>
<version>DEVELOPMENT-SNAPSHOT</version>
<name>SIRIUS web</name>
<description>Provides a modern and scalable web server as SIRIUS module</description>

<properties>
<sirius.kernel>dev-43.1.0</sirius.kernel>
<sirius.kernel>dev-44.0.0</sirius.kernel>
</properties>

<repositories>
Expand Down Expand Up @@ -97,14 +97,14 @@
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf</artifactId>
<version>9.8.0</version>
<version>9.11.2</version>
</dependency>

<!-- Used to clean HTML before generating PDF -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.17.2</version>
<version>1.18.3</version>
</dependency>

<!-- Used to render SVG into PDF -->
Expand All @@ -118,30 +118,18 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.5</version>
<version>5.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.5</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Required, as the version provided by poi-ooxml has security issues -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.1</version>
<version>5.3.0</version>
</dependency>

<dependency>
<groupId>com.github.pjfanning</groupId>
<artifactId>excel-streaming-reader</artifactId>
<version>4.3.1</version>
<version>5.0.2</version>
<exclusions>
<exclusion>
<groupId>com.h2database</groupId>
Expand All @@ -154,7 +142,7 @@
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.22</version>
<version>2.2.26</version>
</dependency>

<dependency>
Expand All @@ -170,7 +158,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.109.Final</version>
<version>4.1.115.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
18 changes: 11 additions & 7 deletions src/main/java/sirius/web/data/ExcelExport.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public ImageCell(byte[] fileData, int colWidthInPixel, String fileName) {
this.colWidthInPixel = colWidthInPixel;
try {
determineImageSize(fileData);
} catch (IOException e) {
throw Exceptions.handle(e);
} catch (IOException exception) {
throw Exceptions.handle(exception);
}
}

Expand Down Expand Up @@ -382,8 +382,8 @@ private void addCell(Row row, Object obj, int columnIndex, CellStyle style) {
.collect(Collectors.joining(", ")));
return;
}
} catch (SQLException e) {
Exceptions.ignore(e);
} catch (SQLException exception) {
Exceptions.ignore(exception);
}
}
cell.setCellValue(createRichTextString(obj.toString()));
Expand Down Expand Up @@ -559,11 +559,15 @@ public void writeToStream(OutputStream stream) {
}
workbook.write(out);
}
} catch (IOException e) {
throw Exceptions.handle(e);
} catch (IOException exception) {
throw Exceptions.handle(exception);
} finally {
if (workbook instanceof SXSSFWorkbook sxssfWorkbook) {
sxssfWorkbook.dispose();
try {
sxssfWorkbook.close();
} catch (IOException exception) {
throw Exceptions.handle(exception);
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sirius/web/templates/pdf/InlinedSvgElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public void paint(RenderingContext renderingContext, ITextOutputDevice outputDev
graphics.dispose();

PageBox page = renderingContext.getPage();
float x = (float) blockBox.getAbsX() + page.getMarginBorderPadding(renderingContext, CalculatedStyle.LEFT);
float x = (float) blockBox.getAbsX() + page.getMarginBorderPadding(renderingContext, CalculatedStyle.Edge.LEFT);
float y = (float) (page.getBottom() - (blockBox.getAbsY() + cssHeight)) + page.getMarginBorderPadding(
renderingContext,
CalculatedStyle.BOTTOM);
CalculatedStyle.Edge.BOTTOM);
x /= outputDevice.getDotsPerPoint();
y /= outputDevice.getDotsPerPoint();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public FSImage resolveUri(String uri, UserAgentCallback userAgentCallback, int c
FSImage fsImage = new ITextFSImage(com.lowagie.text.Image.getInstance(awtImage, Color.WHITE, true));

if (cssWidth != -1 || cssHeight != -1) {
fsImage.scale(cssWidth, cssHeight);
return fsImage.scale(cssWidth, cssHeight);
}

return fsImage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected FSImage resizeImage(FSImage image, int cssWidth, int cssHeight) {
Tuple<Integer, Integer> newSize = computeResizeBox(cssWidth, cssHeight, image);

if (newSize != null) {
image.scale(newSize.getFirst(), newSize.getSecond());
return image.scale(newSize.getFirst(), newSize.getSecond());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public FSImage resolveUri(String uri, UserAgentCallback userAgentCallback, int c
FSImage fsImage = new ITextFSImage(Image.getInstance(MatrixToImageWriter.toBufferedImage(matrix), Color.WHITE));

if (cssWidth != -1 || cssHeight != -1) {
fsImage.scale(cssWidth, cssHeight);
return fsImage.scale(cssWidth, cssHeight);
}

return fsImage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import org.xhtmlrenderer.pdf.ITextFSImage
import sirius.kernel.SiriusExtension
import kotlin.test.assertEquals

@ExtendWith(SiriusExtension::class)
class PdfReplaceHandlerTest {

@Test
Expand Down

0 comments on commit a82379e

Please sign in to comment.