Changeset 19103 in josm for trunk/test


Ignore:
Timestamp:
2024-06-13T00:23:03+02:00 (5 months ago)
Author:
taylor.smock
Message:

Cleanup some new PMD warnings from PMD 7.x (followup of r19101)

Location:
trunk/test/unit/org/openstreetmap/josm/tools
Files:
3 edited

Legend:

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

    r18985 r19103  
    1313import org.junit.jupiter.api.BeforeAll;
    1414import org.junit.jupiter.api.Test;
     15import org.junit.jupiter.api.condition.EnabledIf;
     16import org.junit.jupiter.api.condition.EnabledOnOs;
     17import org.junit.jupiter.api.condition.OS;
    1518import org.openstreetmap.josm.spi.preferences.Config;
    1619
     
    3538    @Test
    3639    void testStartupHook() {
    37         hook.startupHook((a, b, c, d) -> System.out.println("java callback"), u -> System.out.println("webstart callback"),
     40        hook.startupHook((a, b, c, d) -> System.out.println("java callback"),
    3841                (a, b, c) -> System.out.println("sanity check callback"));
    3942    }
     
    5154     * @throws IOException if an error occurs
    5255     */
     56    @EnabledOnOs(OS.MAC)
    5357    @Test
    5458    void testOpenUrl() throws IOException {
    55         assumeTrue(PlatformManager.isPlatformOsx());
    5659        hook.openUrl(Config.getUrls().getJOSMWebsite());
    5760    }
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    r18985 r19103  
    4646    void testStartupHook() {
    4747        final PlatformHook.JavaExpirationCallback javaCallback = (a, b, c, d) -> System.out.println("java callback");
    48         final PlatformHook.WebStartMigrationCallback webstartCallback = u -> System.out.println("webstart callback");
    4948        final PlatformHook.SanityCheckCallback sanityCheckCallback = (a, b, c) -> System.out.println("sanity check callback");
    50         assertDoesNotThrow(() -> hook.startupHook(javaCallback, webstartCallback, sanityCheckCallback));
     49        assertDoesNotThrow(() -> hook.startupHook(javaCallback, sanityCheckCallback));
    5150    }
    5251
  • trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java

    r19092 r19103  
    354354
    355355    /**
    356      * Tests if readBytesFromStream handles null streams (might happen when there is no data on error stream)
    357      * @throws IOException in case of I/O error
    358      * @deprecated {@link Utils#readBytesFromStream(InputStream)} is deprecated since the JVM has the same functionality.
    359      */
    360     @Test
    361     @Deprecated
    362     void testNullStreamForReadBytesFromStream() throws IOException {
    363         assertEquals(0, Utils.readBytesFromStream(null).length, "Empty on null stream");
    364     }
    365 
    366     /**
    367356     * Test of {@link Utils#getLevenshteinDistance} method.
    368357     */
Note: See TracChangeset for help on using the changeset viewer.