code: @Restricted(NoExternalUse.class)
      public static String getDisplayName(Task t) {
          try {
              return t.getDisplayName();
          } catch (RuntimeException | Error x) {
              LOGGER.log(Level.WARNING, "failed to find displayName of " + t, x);
              return t.toString();
          }
      }
docs: Like {@link Task#getDisplayName} but more robust.