Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageEntryTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageEntryTest.java	(revision 9329)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageEntryTest.java	(revision 9334)
@@ -5,10 +5,7 @@
 
 import java.io.File;
-import java.io.IOException;
 
 import org.junit.Test;
 import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.io.IllegalDataException;
-import org.xml.sax.SAXException;
 
 /**
@@ -19,10 +16,7 @@
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12255">#12255</a>.
-     * @throws IllegalDataException if an error was found while parsing the data from the source
-     * @throws IOException if any I/O error occurs
-     * @throws SAXException if any XML error occurs
      */
     @Test
-    public void testTicket12255() throws IllegalDataException, IOException, SAXException {
+    public void testTicket12255() {
         ImageEntry e = new ImageEntry(new File(TestUtils.getRegressionDataFile(12255, "G0016941.JPG")));
         e.extractExif();
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java	(revision 9329)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java	(revision 9334)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+import org.openstreetmap.josm.gui.mappaint.StyleSource;
 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
@@ -41,13 +42,22 @@
         assertFalse(sources.isEmpty());
         Map<String, Collection<Throwable>> allErrors = new HashMap<>();
+        Map<String, Collection<String>> allWarnings = new HashMap<>();
         for (ExtendedSourceEntry source : sources) {
-            System.out.println(source.url);
-            Collection<Throwable> errors = MapPaintStyles.addStyle(source);
-            System.out.println(errors.isEmpty() ? " => OK" : " => KO");
-            if (!errors.isEmpty()) {
-                allErrors.put(source.url, errors);
+            // Do not validate XML styles
+            if (!"xml".equalsIgnoreCase(source.styleType)) {
+                System.out.println(source.url);
+                StyleSource style = MapPaintStyles.addStyle(source);
+                System.out.println(style.isValid() ? " => OK" : " => KO");
+                Collection<Throwable> errors = style.getErrors();
+                Collection<String> warnings = style.getWarnings();
+                if (!errors.isEmpty()) {
+                    allErrors.put(source.url, errors);
+                }
+                if (!warnings.isEmpty()) {
+                    allWarnings.put(source.url, warnings);
+                }
             }
         }
-        assertTrue(allErrors.toString(), allErrors.isEmpty());
+        assertTrue(allErrors.toString()+"\n"+allWarnings.toString(), allErrors.isEmpty() && allWarnings.isEmpty());
     }
 }
