From 06812639c573b6973553d188f78e1ac57ccfa864 Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Fri, 23 Sep 2022 10:15:44 +0000 Subject: Fix tests on Java 19 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1904229 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java | 4 ++-- .../test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java | 5 ++++- fop/build.xml | 4 ++-- pom.xml | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java index 20d42e395..e80a37725 100644 --- a/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java @@ -20,6 +20,7 @@ package org.apache.fop.render.pdf; import java.awt.Color; +import java.awt.color.ColorSpace; import java.awt.color.ICC_Profile; import java.awt.image.BufferedImage; import java.awt.image.IndexColorModel; @@ -181,8 +182,7 @@ public class ImageRenderedAdapterTestCase { // ICC Color info PDFFactory factory = mock(PDFFactory.class); PDFICCStream iccStream = mock(PDFICCStream.class); - ICC_Profile iccProfile = mock(ICC_Profile.class); - when(iccProfile.getNumComponents()).thenReturn(4); + ICC_Profile iccProfile = ICC_Profile.getInstance(ColorSpace.CS_sRGB); when(iccStream.getICCProfile()).thenReturn(iccProfile); when(factory.makePDFICCStream()).thenReturn(iccStream); PDFICCBasedColorSpace iccbcs = new PDFICCBasedColorSpace(null, iccStream); diff --git a/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java b/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java index eb0bc382a..e98e3066d 100644 --- a/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java @@ -168,7 +168,10 @@ public class BasicGlyphVectorTestCase extends FOPGVTGlyphVectorTest { for (int i = 0; i < 3; i++) { glyphVector.setGlyphTransform(i, new AffineTransform(0.7, 0.7, -0.7, 0.7, 0, 0)); } - assertEquals(new Rectangle2D.Float(-2.8f, -5.6f, 37.8f, 16.8f), glyphVector.getLogicalBounds()); + Rectangle2D bounds = glyphVector.getLogicalBounds(); + assertEquals(new Rectangle2D.Float(-2.8f, -5.6f, 37.8f, 16.8f), + new Rectangle2D.Float((float) bounds.getX(), (float) bounds.getY(), + (float) bounds.getWidth(), (float) bounds.getHeight())); } @Test diff --git a/fop/build.xml b/fop/build.xml index e30da5133..2daaf627e 100644 --- a/fop/build.xml +++ b/fop/build.xml @@ -159,8 +159,8 @@ list of possible build targets. - - + + diff --git a/pom.xml b/pom.xml index dd14cecd5..846278026 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 1.9.15 1.8 - 1.14.0-SNAPSHOT + 1.15.0-SNAPSHOT 1.9.1 2.14 2.11.0 @@ -22,7 +22,7 @@ 1.4.0 3.0.4 3.1.1 - 1.7 + 1.8 4.11 UTF-8 2.8 -- cgit v1.2.3