/guava/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java
requireNonNull ( thread ) ;
: Executors.defaultThreadFactory(); AtomicLong count = (nameFormat != null) ? new AtomicLong(0) : null; return new ThreadFactory() { @Override public Thread newThread(Runnable runnable) { Thread thread = backingThreadFactory.newThread(runnable); <extra_id_0> if (nameFormat != null) { thread.setName(format(nameFormat, requireNonNull(count).getAndIncrement())); } if (daemon != null) { thread.setDaemon(daemon); }