Warning in copyInstance class for threadPool