Followup to r1454962
Simplify code, move prefix string outside the loop

I have not profiled this, but looking at source code
Class.getPackage() relies on Class.getName() and ClassLoader.getPackage(name),
and thus have to be slower than just calling getName().

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1460626 13f79535-47bb-0310-9956-ffa450edef68