Changeset 17688 in josm for trunk/test


Ignore:
Timestamp:
2021-03-30T09:03:19+02:00 (3 years ago)
Author:
simon04
Message:

see #19724 - Fix NPE in PlatformHookWindows.getInstalledFonts on Linux/macOS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    r17679 r17688  
    55import static org.junit.jupiter.api.Assertions.assertFalse;
    66import static org.junit.jupiter.api.Assertions.assertNotNull;
    7 import static org.junit.jupiter.api.Assertions.assertNull;
    87import static org.junit.jupiter.api.Assertions.assertTrue;
    98import static org.junit.jupiter.api.Assertions.fail;
     
    1312import java.io.File;
    1413import java.io.IOException;
    15 import java.nio.file.FileSystems;
    1614import java.security.KeyStoreException;
    1715import java.util.Collection;
     
    172170    @Test
    173171    void testGetInstalledFonts() {
    174         assumeTrue(FileSystems.getDefault() != null); // weird NPE on Jenkins
    175         assumeTrue(Utils.getJavaVersion() < 16 || PlatformManager.isPlatformWindows()); // No idea why the test fails with Java 16+ on Linux
    176172        Collection<String> fonts = hook.getInstalledFonts();
    177173        if (PlatformManager.isPlatformWindows()) {
    178174            assertFalse(fonts.isEmpty());
    179175        } else {
    180             assertNull(fonts);
     176            assumeTrue(fonts.isEmpty());
    181177        }
    182178    }
Note: See TracChangeset for help on using the changeset viewer.