From c80f7c1b99b7d93919679cad6c0b0e971dde0059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 30 Aug 2024 09:06:51 +0200 Subject: [PATCH 1/2] Fix CVE [LOW] com.google.guava:guava@21.0: SNYK-JAVA-COMGOOGLEGUAVA-1015415 CWE-200 [Fixed in: 30.0-android, 30.0-jre]. [LOW] com.google.guava:guava@21.0: SNYK-JAVA-COMGOOGLEGUAVA-5710356 CWE-379 [Fixed in: 32.0.0-android, 32.0.0-jre]. [LOW] com.google.guava:guava@30.1.1-jre: SNYK-JAVA-COMGOOGLEGUAVA-5710356 CWE-379 [Fixed in: 32.0.0-android, 32.0.0-jre]. [HIGH] org.geotools:gt-main@24.7: SNYK-JAVA-ORGGEOTOOLS-3329308 CWE-89 [Fixed in: 27.5, 28.3]. [MEDIUM] org.springframework:spring-expression@5.3.37: SNYK-JAVA-ORGSPRINGFRAMEWORK-7687446 CWE-770 [Fixed in: 5.3.39]. [MEDIUM] org.springframework:spring-web@5.3.37: SNYK-JAVA-ORGSPRINGFRAMEWORK-7687447 CWE-400 [Fixed in: 5.3.38, 6.0.23, 6.1.12]. [MEDIUM] org.testng:testng@7.5: SNYK-JAVA-ORGTESTNG-3040285 CWE-29 [Fixed in: 7.5.1, 7.7.0]. --- core/build.gradle | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index c0a74e1872..0db8b6c871 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -113,13 +113,13 @@ configurations { } ext { - springVersion = '5.3.37' + springVersion = '5.3.39' } dependencies { def slf4jVersion = '1.7.36' def metricsVersion = '4.2.26' - def geotoolsVersion = '24.7' + def geotoolsVersion = '27.5' def logbackVersion = '1.4.14' compile( @@ -141,7 +141,8 @@ dependencies { // Indirect dependencies 'org.apache.commons:commons-text:1.10.0', 'org.hsqldb:hsqldb:2.7.3', - 'com.fasterxml.jackson.core:jackson-databind:2.13.5' + 'com.fasterxml.jackson.core:jackson-databind:2.13.5', + 'org.testng:testng:7.5.1', ) metrics( "io.dropwizard.metrics:metrics-core:$metricsVersion", @@ -172,7 +173,7 @@ dependencies { ) compile fileTree(dir: "$projectDir/libs", include: '*.jar') compile( - 'com.google.guava:guava:30.1.1-jre', + 'com.google.guava:guava:32.0.0-jre', "org.slf4j:slf4j-api:${slf4jVersion}", "org.slf4j:jcl-over-slf4j:${slf4jVersion}", "org.slf4j:jul-to-slf4j:${slf4jVersion}", From c7f27b4ae789d4d19178cd4298947464385bd726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 1 Mar 2022 13:58:54 +0100 Subject: [PATCH 2/2] Fix the grid unit symbol --- .../mapfish/print/map/geotools/grid/GridParam.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/mapfish/print/map/geotools/grid/GridParam.java b/core/src/main/java/org/mapfish/print/map/geotools/grid/GridParam.java index 5afe04964a..a33e9638a7 100644 --- a/core/src/main/java/org/mapfish/print/map/geotools/grid/GridParam.java +++ b/core/src/main/java/org/mapfish/print/map/geotools/grid/GridParam.java @@ -1,5 +1,6 @@ package org.mapfish.print.map.geotools.grid; +import org.geotools.measure.Units; import org.geotools.referencing.CRS; import org.geotools.referencing.operation.transform.IdentityTransform; import org.locationtech.jts.util.Assert; @@ -14,6 +15,8 @@ import java.util.Arrays; import java.util.IllegalFormatException; +import javax.measure.Unit; + /** * Parameters relevant to creating Grid layers. */ @@ -244,14 +247,14 @@ public void postConstruct() { * @param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined. */ public String calculateLabelUnit(final CoordinateReferenceSystem mapCrs) { - String unit; + Unit unit; if (this.labelProjection != null) { - unit = this.labelCRS.getCoordinateSystem().getAxis(0).getUnit().toString(); + unit = this.labelCRS.getCoordinateSystem().getAxis(0).getUnit(); } else { - unit = mapCrs.getCoordinateSystem().getAxis(0).getUnit().toString(); + unit = mapCrs.getCoordinateSystem().getAxis(0).getUnit(); } - return unit; + return Units.toSymbol(unit); } /**