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

Issue #7031 - Fixing ResponseWriter println methods #7032

Merged
merged 1 commit into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
public class ResponseWriter extends PrintWriter
{
private static final Logger LOG = LoggerFactory.getLogger(ResponseWriter.class);
private static final String __lineSeparator = System.getProperty("line.separator");
private static final String __trueln = "true" + __lineSeparator;
private static final String __falseln = "false" + __lineSeparator;

private final HttpWriter _httpWriter;
private final Locale _locale;
Expand Down Expand Up @@ -321,7 +318,7 @@ public void println()
synchronized (lock)
{
isOpen();
out.write(__lineSeparator);
out.write(System.lineSeparator());
}
}
catch (InterruptedIOException ex)
Expand All @@ -339,7 +336,7 @@ public void println()
@Override
public void println(boolean b)
{
println(b ? __trueln : __falseln);
println(Boolean.toString(b));
}

@Override
Expand All @@ -351,6 +348,7 @@ public void println(char c)
{
isOpen();
out.write(c);
out.write(System.lineSeparator());
}
}
catch (InterruptedIOException ex)
Expand Down Expand Up @@ -398,7 +396,7 @@ public void println(char[] s)
{
isOpen();
out.write(s, 0, s.length);
out.write(__lineSeparator);
out.write(System.lineSeparator());
}
}
catch (InterruptedIOException ex)
Expand All @@ -425,7 +423,7 @@ public void println(String s)
{
isOpen();
out.write(s, 0, s.length());
out.write(__lineSeparator);
out.write(System.lineSeparator());
}
}
catch (InterruptedIOException ex)
Expand Down
Loading