[
https://issues.apache.org/jira/browse/SLING-9626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bertrand Delacretaz updated SLING-9626:
---------------------------------------
Description:
The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the
{{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as
such [closes the
Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413].
This causes a "Writer has already been closed" Exception when {{flush()}} is
called.
was:
The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the
{{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as
such [closes the
Writer|https://github.com/apache/sling-org-apache-sling-graphql-core/blob/b22657e5cc435332cec7c60ad30692d2190caff8/src/main/java/org/apache/sling/graphql/core/json/JsonSerializer.java#L53].
This causes a "Writer has already been closed" Exception when {{flush()}} is
called.
> "Writer has already been closed" exception in GraphQLServlet
> ------------------------------------------------------------
>
> Key: SLING-9626
> URL: https://issues.apache.org/jira/browse/SLING-9626
> Project: Sling
> Issue Type: Bug
> Components: GraphQL
> Affects Versions: GraphQL Core 0.0.4
> Reporter: Evgeny Tugarev
> Priority: Major
>
> The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the
> {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as
> such [closes the
> Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413].
> This causes a "Writer has already been closed" Exception when {{flush()}} is
> called.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)