Index: /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 19054)
+++ /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 19055)
@@ -21,5 +21,4 @@
 import java.util.Collections;
 import java.util.List;
-import java.util.Locale;
 import java.util.function.Consumer;
 import java.util.stream.Collectors;
@@ -42,5 +41,4 @@
 import org.openstreetmap.josm.testutils.annotations.Projection;
 import org.openstreetmap.josm.tools.ColorHelper;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -70,81 +68,81 @@
     public static Collection<Object[]> runs() {
         return Stream.of(
-                /** Tests for StyledMapRenderer#drawNodeSymbol */
+                /* Tests for StyledMapRenderer#drawNodeSymbol */
                 new TestConfig("node-shapes", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Text for nodes */
+                /* Text for nodes */
                 new TestConfig("node-text", AREA_DEFAULT).usesFont("DejaVu Sans")
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests that StyledMapRenderer#drawWay respects width */
+                /* Tests that StyledMapRenderer#drawWay respects width */
                 new TestConfig("way-width", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests the way color property, including alpha */
+                /* Tests the way color property, including alpha */
                 new TestConfig("way-color", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests dashed ways. */
+                /* Tests dashed ways. */
                 new TestConfig("way-dashes", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests dashed way clamping algorithm */
+                /* Tests dashed way clamping algorithm */
                 new TestConfig("way-dashes-clamp", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests fill-color property */
+                /* Tests fill-color property */
                 new TestConfig("area-fill-color", AREA_DEFAULT),
 
-                /** Tests the fill-image property. */
+                /* Tests the fill-image property. */
                 new TestConfig("area-fill-image", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests area label drawing/placement */
+                /* Tests area label drawing/placement */
                 new TestConfig("area-text", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests area icon drawing/placement */
+                /* Tests area icon drawing/placement */
                 new TestConfig("area-icon", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests if all styles are sorted correctly. Tests {@link StyleRecord#compareTo(StyleRecord)} */
+                /* Tests if all styles are sorted correctly. Tests {@link StyleRecord#compareTo(StyleRecord)} */
                 new TestConfig("order", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests repeat-image feature for ways */
+                /* Tests repeat-image feature for ways */
                 new TestConfig("way-repeat-image", AREA_DEFAULT)
                         .setThresholdPixels(2100).setThresholdTotalColorDiff(93_000),
-                /** Tests the clamping for repeat-images and repeat-image-phase */
+                /* Tests the clamping for repeat-images and repeat-image-phase */
                 new TestConfig("way-repeat-image-clamp", AREA_DEFAULT)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests text along a way */
+                /* Tests text along a way */
                 new TestConfig("way-text", AREA_DEFAULT)
                         .setThresholdPixels(3400).setThresholdTotalColorDiff(0),
 
-                /** Another test for node shapes */
+                /* Another test for node shapes */
                 new TestConfig("node-shapes2").setImageWidth(600)
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
-                /** Tests default values for node shapes */
+                /* Tests default values for node shapes */
                 new TestConfig("node-shapes-default")
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
-                /** Tests node shapes with both fill and stroke combined */
+                /* Tests node shapes with both fill and stroke combined */
                 new TestConfig("node-shapes-combined")
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
-                /** Another test for dashed ways */
+                /* Another test for dashed ways */
                 new TestConfig("way-dashes2")
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
-                /** Tests node text placement */
+                /* Tests node text placement */
                 new TestConfig("node-text2")
                         .setThresholdPixels(1020).setThresholdTotalColorDiff(0),
-                /** Tests relation link selector */
+                /* Tests relation link selector */
                 new TestConfig("relation-linkselector")
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
-                /** Tests parent selector on relation */
+                /* Tests parent selector on relation */
                 new TestConfig("relation-parentselector")
                         .setThresholdPixels(0).setThresholdTotalColorDiff(0),
 
-                /** Tests evaluation of expressions */
+                /* Tests evaluation of expressions */
                 new TestConfig("eval").setImageWidth(600)
                         .setThresholdPixels(6610).setThresholdTotalColorDiff(0)
@@ -163,9 +161,4 @@
     @MethodSource("runs")
     void testRender(TestConfig testConfig, String ignored) throws Exception {
-        // This test only runs on OpenJDK.
-        // It is ignored for other Java versions since they differ slightly in their rendering engine.
-        String javaHome = System.getProperty("java.home");
-        assumeTrue(javaHome != null && javaHome.toLowerCase(Locale.ENGLISH).contains("openjdk"), "Test requires openJDK");
-
         List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
         for (String font : testConfig.fonts) {
@@ -228,6 +221,6 @@
         }
         final BufferedImage reference = ImageIO.read(referenceImageFile);
-        assertEquals(image.getWidth(), reference.getWidth());
-        assertEquals(image.getHeight(), reference.getHeight());
+        assertEquals(reference.getWidth(), image.getWidth());
+        assertEquals(reference.getHeight(), image.getHeight());
 
         StringBuilder differences = new StringBuilder();
@@ -331,5 +324,5 @@
         /**
          * Set the number of pixels that can differ.
-         *
+         * <p>
          * Needed due to somewhat platform dependent font rendering.
          * @param thresholdPixels the number of pixels that can differ
@@ -359,7 +352,7 @@
 
         public File getReference() {
-            // Java 8 renders SVG images differently, thus, use separate reference files
-            final String javaSuffix = Utils.getJavaVersion() == 8 ? "-java8" : "";
-            return new File(getTestDirectory() + "/reference" + javaSuffix + ".png");
+            // Sometimes Java changes how things are rendered. When that happens, use separate reference files. It is
+            // usually "reference" + javaSuffix + ".png".
+            return new File(getTestDirectory() + "/reference.png");
         }
 
Index: /trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTest.java	(revision 19054)
+++ /trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTest.java	(revision 19055)
@@ -189,13 +189,6 @@
 
     private static File getReferenceFile(String reference) {
-        // Java 8 and Java 21 render SVG images differently, thus, use separate reference files
-        final String javaSuffix;
-        switch (Utils.getJavaVersion()) {
-            case 8: javaSuffix = "-java8";
-            break;
-            case 21: javaSuffix = "-java21";
-            break;
-            default: javaSuffix = "";
-        }
+        // Java 11-17 and Java 21 render SVG images differently, thus, use separate reference files
+        final String javaSuffix = Utils.getJavaVersion() == 21 ? "-java21" : "";
         return new File(TestUtils.getTestDataRoot() + "/" + ImageProviderTest.class.getSimpleName() + javaSuffix + "/" + reference + ".png");
     }
Index: /trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 19054)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 19055)
@@ -24,4 +24,5 @@
 import org.openstreetmap.josm.testutils.annotations.I18n;
 import org.openstreetmap.josm.tools.UncheckedParseException;
+import org.openstreetmap.josm.tools.Utils;
 
 import net.trajano.commons.testing.UtilityClassTestUtil;
@@ -153,12 +154,15 @@
     @Test
     void testFormatTime() {
-        assertEquals("12:00 AM", DateUtils.formatTime(new Date(0), DateFormat.SHORT));
-        assertEquals("1:00 AM", DateUtils.formatTime(new Date(60 * 60 * 1000), DateFormat.SHORT));
-        assertEquals("12:00 AM", DateUtils.formatTime(new Date(999), DateFormat.SHORT));
+        // Somewhere between Java 17 and Java 21, a non-breaking space replaced the original space between the time and AM/PM.
+        final var separator = Utils.getJavaVersion() >= 21 ? '\u202f' : ' ';
+        final var twelveAM = "12:00" + separator + "AM";
+        assertEquals(twelveAM, DateUtils.formatTime(new Date(0), DateFormat.SHORT));
+        assertEquals("1:00" + separator + "AM", DateUtils.formatTime(new Date(60 * 60 * 1000), DateFormat.SHORT));
+        assertEquals(twelveAM, DateUtils.formatTime(new Date(999), DateFormat.SHORT));
         // ignore seconds
-        assertEquals("12:00 AM", DateUtils.formatTime(new Date(5999), DateFormat.SHORT));
+        assertEquals(twelveAM, DateUtils.formatTime(new Date(5999), DateFormat.SHORT));
 
         setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
-        assertEquals("1:00:00 AM GMT+01:00", DateUtils.formatTime(new Date(0), DateFormat.LONG), "This is mostly dependent upon java.locale.providers. CET is also OK.");
+        assertEquals("1:00:00" + separator + "AM GMT+01:00", DateUtils.formatTime(new Date(0), DateFormat.LONG), "This is mostly dependent upon java.locale.providers. CET is also OK.");
     }
 
