rotty3000/liferay-portal — pull request #300 by shuyangzhou (2013-08-24 16:57:31+00:00)
Title: LPS-39254 Avoid doPrivileged call in processTemplate, when security is not required

Ray, we missed one important part.

The code is not very elegant, ideally we should move the AccessController.doPrivileged() call from FreeMarkerTemplate/VelocityTemplate to PrivilegedTemplateWrapper.

But because the current logic impl, it is not doable.

Once you finished the statical security manager change, we may want to revisit this one to try to move the AccessController.doPrivileged() into PrivilegedTemplateWrapper.