Skip to content

Commit

Permalink
Fixes #10338 - ErorrHandler#writeErrorJson is private
Browse files Browse the repository at this point in the history
Made the writeErrorXYZ() methods protected in ErrorHandler for core, ee9 and ee10.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Aug 23, 2023
1 parent 04b53f3 commit 9d90883
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ protected void writeErrorPlain(Request request, PrintWriter writer, int code, St
}
}

private void writeErrorJson(Request request, PrintWriter writer, int code, String message, Throwable cause, boolean showStacks)
protected void writeErrorJson(Request request, PrintWriter writer, int code, String message, Throwable cause, boolean showStacks)
{
Map<String, String> json = new HashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ private void htmlRow(Writer writer, String tag, Object value) throws IOException
writer.write("</td></tr>\n");
}

private void writeErrorPlain(HttpServletRequest request, PrintWriter writer, int code, String message)
protected void writeErrorPlain(HttpServletRequest request, PrintWriter writer, int code, String message)
{
writer.write("HTTP ERROR ");
writer.write(Integer.toString(code));
Expand All @@ -465,7 +465,7 @@ private void writeErrorPlain(HttpServletRequest request, PrintWriter writer, int
}
}

private void writeErrorJson(HttpServletRequest request, PrintWriter writer, int code, String message)
protected void writeErrorJson(HttpServletRequest request, PrintWriter writer, int code, String message)
{
Throwable cause = (Throwable)request.getAttribute(Dispatcher.ERROR_EXCEPTION);
Object servlet = request.getAttribute(Dispatcher.ERROR_SERVLET_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ private void htmlRow(Writer writer, String tag, Object value)
writer.write("</td></tr>\n");
}

private void writeErrorPlain(HttpServletRequest request, PrintWriter writer, int code, String message)
protected void writeErrorPlain(HttpServletRequest request, PrintWriter writer, int code, String message)
{
writer.write("HTTP ERROR ");
writer.write(Integer.toString(code));
Expand All @@ -458,7 +458,7 @@ private void writeErrorPlain(HttpServletRequest request, PrintWriter writer, int
}
}

private void writeErrorJson(HttpServletRequest request, PrintWriter writer, int code, String message)
protected void writeErrorJson(HttpServletRequest request, PrintWriter writer, int code, String message)
{
Throwable cause = (Throwable)request.getAttribute(Dispatcher.ERROR_EXCEPTION);
Object servlet = request.getAttribute(Dispatcher.ERROR_SERVLET_NAME);
Expand Down

0 comments on commit 9d90883

Please sign in to comment.