Check for a behavior change on the setComment method

This rule flags references to the javax.servlet.SessionCookieConfig.setComment() method because the Servlet 3.1 implementation throws an illegalStateException if the method is called after the ServletContext object is initialized. Servlet 3.0 does not prevent use of this API after the context is initialized. As a result, applications that depend on the Servlet 3.0 behavior will not work with Servlet 3.1. For more information about this method, see Interface SessionCookieConfig.

To avoid these exceptions, ensure that your application does not call the setComment() method after the context is initialized.

For more information on Servlet 3.1 behavior changes, see the following resource: Servlet 3.1 behavior changes.