Hello,
I'm not following you on this. As far as I can tell, this is not a FP and the issue is legit. The rule
S1989 stands clearly the following:
Even though the signatures for methods in a servlet include throws IOException, ServletException, it's a bad idea to let such exceptions be thrown.
The try-with-resource only closes the resources at the end of its execution. It does not swallow any exception which may be thrown in is resource declaration part. In your case, having the call to "getWriter()" in the resource declaration part of the try-with-resource statement does not prevent any IOException to occur.
Indeed, according to the signature of the "getWriter()" method, an "IOException" can be thrown when calling it. Consequently, you have to catch the exception, or you are going to let the exception be thrown by the "doGet(...)" method.
Regards,
Michael