Changeset 18985 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2024-02-14T18:11:54+01:00 (10 months ago)
Author:
taylor.smock
Message:

Fix #23355: Sanity check JVM arguments on startup

See #17858: JOSM will no longer continue running if the user is on an unsupported
Java version (for this commit, older than Java 11; message indicates Java 17).
This does update the link for Azul from Java 17 to Java 21 as well.

In order to (hopefully) reduce confusion, the webstart and Java update nags will
also be reset in the event that JOSM will exit due to old Java versions. This is
mostly so that users will get the messages to update to OpenWebstart or the
appropriate Java link for their platform and architecture.

Additionally, this will (hopefully) reduce the number of tickets we have to close
due to missing JVM arguments by informing users of the missing arguments at startup.

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

Legend:

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

    r18853 r18985  
    3535    @Test
    3636    void testStartupHook() {
    37         hook.startupHook((a, b, c, d) -> System.out.println("java callback"), u -> System.out.println("webstart callback"));
     37        hook.startupHook((a, b, c, d) -> System.out.println("java callback"), u -> System.out.println("webstart callback"),
     38                (a, b, c) -> System.out.println("sanity check callback"));
    3839    }
    3940
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    r18893 r18985  
    4747        final PlatformHook.JavaExpirationCallback javaCallback = (a, b, c, d) -> System.out.println("java callback");
    4848        final PlatformHook.WebStartMigrationCallback webstartCallback = u -> System.out.println("webstart callback");
    49         assertDoesNotThrow(() -> hook.startupHook(javaCallback, webstartCallback));
     49        final PlatformHook.SanityCheckCallback sanityCheckCallback = (a, b, c) -> System.out.println("sanity check callback");
     50        assertDoesNotThrow(() -> hook.startupHook(javaCallback, webstartCallback, sanityCheckCallback));
    5051    }
    5152
Note: See TracChangeset for help on using the changeset viewer.