This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 771fa7e3cee3a0be9f3d848a2a1c632c50637db0 Author: jsorel <[email protected]> AuthorDate: Thu Nov 12 10:56:20 2026 +0100 fix(Style): fix parsing empty png in the tests --- .../test/org/apache/sis/style/xml/StyleReaderTest.java | 5 ++++- .../apache/sis/style/xml/se1/SE_ExternalGraphic_InlineContent.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/StyleReaderTest.java b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/StyleReaderTest.java index 9052fcd0dd..d350bdfea5 100644 --- a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/StyleReaderTest.java +++ b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/StyleReaderTest.java @@ -339,7 +339,10 @@ public final class StyleReaderTest extends StyleXmlTestCase { symbolizer = read("se1/SE_ExternalGraphic_InlineContent.xml", PointSymbolizer.class); graphic = assertInstanceOf(ExternalGraphic.class, symbolizer.getGraphic().graphicalSymbols().get(0)); final InlineImage image = assertInstanceOf(InlineImage.class, graphic.getInlineContent().orElseThrow()); - assertArrayEquals(Base64.getDecoder().decode("iVBORw0KGgoAAAANSUhEUg=="), image.data); + assertArrayEquals(Base64.getDecoder().decode( + "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="), image.data); + assertEquals(1, image.getIconWidth(), "The inline PNG should be decodable."); + assertEquals(1, image.getIconHeight(), "The inline PNG should be decodable."); assertEquals("image/png", graphic.getFormat().orElseThrow()); } diff --git a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/se1/SE_ExternalGraphic_InlineContent.xml b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/se1/SE_ExternalGraphic_InlineContent.xml index 15cfe41453..015a3be1ca 100644 --- a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/se1/SE_ExternalGraphic_InlineContent.xml +++ b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/style/xml/se1/SE_ExternalGraphic_InlineContent.xml @@ -3,7 +3,7 @@ <se:PointSymbolizer xmlns:se="http://www.opengis.net/se"> <se:Graphic> <se:ExternalGraphic> - <se:InlineContent encoding="base64">iVBORw0KGgoAAAANSUhEUg==</se:InlineContent> + <se:InlineContent encoding="base64">iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==</se:InlineContent> <se:Format>image/png</se:Format> </se:ExternalGraphic> </se:Graphic>
