Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java	(revision 18805)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java	(revision 18806)
@@ -220,5 +220,5 @@
     @Override
     public Instant getLastModified() {
-        if (this.getImageURI().getScheme().contains("file:")) {
+        if ("file".equals(this.getImageURI().getScheme())) {
             try {
                 return Files.getLastModifiedTime(Paths.get(this.getImageURI())).toInstant();
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntryTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntryTest.java	(revision 18805)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntryTest.java	(revision 18806)
@@ -2,4 +2,7 @@
 package org.openstreetmap.josm.gui.layer.geoimage;
 
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+
+import java.io.File;
 import java.net.URI;
 import java.util.Objects;
@@ -8,4 +11,5 @@
 import nl.jqno.equalsverifier.EqualsVerifier;
 import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.TestUtils;
 
 /**
@@ -13,10 +17,11 @@
  */
 class RemoteEntryTest {
+    private static final Supplier<RemoteEntry> NULL_SUPPLIER = () -> null;
     @Test
     void testHashCodeEquals() {
-        RemoteEntry remoteEntryA = new RemoteEntry(URI.create("https://somewhere.com/image.png?hash=a"),
-                () -> null, () -> null, () -> null, () -> null);
-        RemoteEntry remoteEntryB = new RemoteEntry(URI.create("https://somewhere.com/image.png?hash=b"),
-                () -> null, () -> null, () -> null, () -> null);
+        final RemoteEntry remoteEntryA = new RemoteEntry(URI.create("https://somewhere.com/image.png?hash=a"),
+                NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER);
+        final RemoteEntry remoteEntryB = new RemoteEntry(URI.create("https://somewhere.com/image.png?hash=b"),
+                NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER);
         EqualsVerifier.simple().forClass(RemoteEntry.class).usingGetClass()
                 .withIgnoredFields("firstImage", "lastImage", "nextImage", "previousImage" /* These suppliers don't have good == semantics */,
@@ -26,5 +31,13 @@
                 .withGenericPrefabValues(Supplier.class,
                         a -> () -> new RemoteEntry(URI.create("https://somewhere.com/image.png?hash=" + Objects.hash(a)),
-                                () -> null, () -> null, () -> null, () -> null)).verify();
+                                NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER)).verify();
+    }
+
+    @Test
+    void testNonRegression23119() {
+        final String fileLocation = TestUtils.getRegressionDataFile(11685, "2015-11-08_15-33-27-Xiaomi_YI-Y0030832.jpg");
+        final RemoteEntry remoteEntry = new RemoteEntry(new File(fileLocation).toURI(),
+                NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER, NULL_SUPPLIER);
+        assertDoesNotThrow(remoteEntry::getLastModified);
     }
 }
