Ignore:
Timestamp:
2024-04-24T20:02:57+02:00 (4 weeks ago)
Author:
taylor.smock
Message:

Fix last failing test in Java 21

  • Generate Java 21 image files (probably from r19043: Drop COMPAT locale provider).
  • Replace most deprecated function calls and classes in tests with non-deprecated functions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/AnnotationUtils.java

    r18106 r19056  
    4848    public static void resetStaticClass(Class<?> clazz) throws ReflectiveOperationException {
    4949        for (Field field : clazz.getDeclaredFields()) {
    50             if (!field.isAccessible()) {
    51                 field.setAccessible(true);
    52             }
    5350            // Don't reset fields that are not static
    5451            if ((field.getModifiers() & Modifier.STATIC) == 0) {
    5552                continue;
     53            }
     54            if (!field.canAccess(null)) {
     55                field.setAccessible(true);
    5656            }
    5757            final boolean isFinal = (field.getModifiers() & Modifier.FINAL) != 0;
Note: See TracChangeset for help on using the changeset viewer.