Skip to content

Instantly share code, notes, and snippets.

@noise
Created December 29, 2010 18:37
Show Gist options
  • Save noise/758856 to your computer and use it in GitHub Desktop.
Save noise/758856 to your computer and use it in GitHub Desktop.
sdfds
fds
fds
public void returnStatus(int statusCode)
{
Timer t = statusTag.create().start();
setResponding();
if (statusCode == Response.SC_NO_CONTENT
&& representor instanceof NoContentRepresentor)
{
statusCode = Response.SC_OK;
this.statusCode = statusCode;
setStatus(statusCode);
((NoContentRepresentor)representor).write(contentType, getRequest(), this);
}
else
{
this.statusCode = statusCode;
setStatus(statusCode);
if (errorRepresentorLookup.isError(statusCode))
{
ErrorRepresentor rep = errorRepresentorLookup.getRepresentor(statusCode);
rep.write(statusCode, contentType, getRequest(), this);
}
}
t.stop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment