enapps-enorman commented on a change in pull request #22:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/22#discussion_r751596983



##########
File path: 
src/main/java/org/apache/sling/servlets/resolver/internal/HandleErrorSlingHttpServletResponse.java
##########
@@ -48,7 +48,7 @@ public PrintWriter getWriter() throws IOException {
      * @return true of open, false otherwise
      */
     public boolean isOpen() {
-        return this.writer.isOpen();
+        return getWriter().isOpen();

Review comment:
       This should work.  However, perhaps it would be a bit more efficient to 
just check if this.writer is null and return false instead of calling 
getWriter() since you would have one less object to get garbage collected 
later. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to