mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Fix Writer lifecycle for writeInternal(Object, Type, Writer)
Closes gh-36565
This commit is contained in:
+1
@@ -127,6 +127,7 @@ public abstract class AbstractJsonHttpMessageConverter extends AbstractGenericHt
|
||||
catch (Exception ex) {
|
||||
throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
|
||||
}
|
||||
writer.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -105,7 +105,6 @@ public class GsonHttpMessageConverter extends AbstractJsonHttpMessageConverter {
|
||||
else {
|
||||
getGson().toJson(object, writer);
|
||||
}
|
||||
writer.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user