Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

letting web server commit the response naturally #1036

Merged
merged 3 commits into from
Dec 11, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
letting web server commit the response naturally
  • Loading branch information
nykolaslima committed Dec 8, 2015
commit 2c56471ef99ac39e305cb0e360d1f6646ff503e2
Original file line number Diff line number Diff line change
@@ -74,7 +74,6 @@ public void serialize() {
response.getWriter().append(callbackName).append("(");
super.serialize();
response.getWriter().append(")");
response.getWriter().flush();
} catch (IOException e) {
throw new ResultException("Unable to serialize data", e);
}
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@
*/
package br.com.caelum.vraptor.serialization.gson;

import static com.google.common.io.Flushables.flushQuietly;
import static java.util.Collections.singletonMap;
import static java.util.Objects.requireNonNull;

@@ -29,13 +28,13 @@

import javax.enterprise.inject.Vetoed;

import com.google.gson.Gson;

import br.com.caelum.vraptor.core.ReflectionProvider;
import br.com.caelum.vraptor.interceptor.TypeNameExtractor;
import br.com.caelum.vraptor.serialization.Serializer;
import br.com.caelum.vraptor.serialization.SerializerBuilder;

import com.google.gson.Gson;

/**
* A SerializerBuilder based on Gson.
*
@@ -144,8 +143,6 @@ public void serialize() {
} else {
gson.toJson(singletonMap(alias, root), writer);
}

flushQuietly(writer);
}

@Override