code: private void setName(Thread thread, String name) {
          try {
              thread.setName(name);
          } catch (SecurityException se) {
              if (LOGGER.isWarnEnabled()) {
                  LOGGER.warn("Failed to set the thread name.", se);
              }
          }
      }
docs: Wraps {@link Thread#setName(String)} to catch a possible {@link Exception}s such as
  {@link SecurityException} in sandbox environments, such as applets