I assume that at one point, UnCatchExceptionThread is passed to your HandlerFactory.newThread() method, and the thread returned by this method is executed. If so, you create a new thread with no name that runs runnable, passed as an argument. Runnable is an instance of UnCatchExceptionThread, but the executable thread is new Thread(r) .
So, inside the Runnable method, run this is an instance of UnCatchExceptionThread and has the name you gave it. But the current thread is new Thread(r) , which has a default name.
source share