Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11458

Regress - "Writer has already been closed" exception in GraphQLServlet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • GraphQL Core 0.0.4
    • None
    • GraphQL
    • None

    Description

      The GraphQLServlet shouldn't call response.getWriter().flush() as the JsonWriter used by the JsonSerializer implements Closeable and as such closes the Writer.

      This causes a "Writer has already been closed" Exception when flush() is called.

      This was fixed in commit d27f4bb7 but then this commit: 11c7e389 did undo the fix as now the JsonWriter is closed when existing the try-catch block.

      I will undo it and prevent the premature closure as this is causing issues like when the call to this servlet is made through a dispatcher.

      Attachments

        Issue Links

          Activity

            People

              andysch Andreas Schaefer
              etugarev Evgeny Tugarev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: