Menu

#17 risky code in servlet doPost method

v1.0
open
nobody
5
2007-04-11
2007-04-11
brain-drop
No

The following code allows the servlet attribute "engine" to be set by any request, which is not thread-safe.

if (state.useRenderers() && !prevRendering)
engine = new Engine(templateDir);

This code can be removed, as the value of "engine" is set in the servlet init() method.

Discussion


Log in to post a comment.