I can't see any null check before transDoc is used. Is there potential for a NullPointerException?