Skip to content

Commit

Permalink
Merge pull request #85 from malithie/DENTITY-4502
Browse files Browse the repository at this point in the history
Fixing IDENTITY-4502
  • Loading branch information
Pushpalanka Jayawardhana committed Apr 13, 2016
2 parents 0349487 + 0577a7c commit abbd637
Showing 1 changed file with 0 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ public class CommonAuthResponseWrapper extends HttpServletResponseWrapper {
private HttpServletRequest request;
private boolean isRedirect = false;
private String redirectURL;
private CommonAuthServletPrintWriter printWriter;

public CommonAuthResponseWrapper(HttpServletResponse response) {
super(response);
extraParameters = new HashMap();
printWriter = new CommonAuthServletPrintWriter(new ByteArrayOutputStream());
}

public CommonAuthResponseWrapper(HttpServletResponse response, HttpServletRequest request) {
Expand All @@ -55,15 +53,6 @@ public void sendRedirect(String location) throws IOException {
isRedirect = true;
}

@Override
public PrintWriter getWriter() throws IOException {
return this.printWriter;
}

public String getResponseBody() {
return this.printWriter.getBufferedString();
}

public boolean isRedirect() {
return isRedirect;
}
Expand All @@ -72,25 +61,4 @@ public String getRedirectURL() {
return redirectURL;
}

private final class CommonAuthServletPrintWriter extends PrintWriter {
StringBuffer buffer = new StringBuffer();

public CommonAuthServletPrintWriter(OutputStream stream) {
super(stream);
}

@Override
public void print(String s) {
buffer.append(s);
}

@Override
public void println(String s) {
buffer.append(s + "\n");
}

public String getBufferedString() {
return this.buffer.toString();
}
}
}

0 comments on commit abbd637

Please sign in to comment.