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

StatusServlet fails to render an error #10067 #10068

Merged
merged 2 commits into from
Mar 8, 2023
Merged

StatusServlet fails to render an error #10067 #10068

merged 2 commits into from
Mar 8, 2023

Conversation

vbradnitski
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (bc0acdf) 84.07% compared to head (58023c1) 84.08%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #10068   +/-   ##
=========================================
  Coverage     84.07%   84.08%           
  Complexity    19292    19292           
=========================================
  Files          2585     2585           
  Lines         67726    67724    -2     
  Branches       5424     5424           
=========================================
  Hits          56943    56943           
+ Misses         8126     8124    -2     
  Partials       2657     2657           
Impacted Files Coverage Δ
...om/enonic/xp/server/impl/status/StatusServlet.java 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

out.println( json.toString() );
out.close();
final OutputStream out = res.getOutputStream();
out.write( json.toString().getBytes( StandardCharsets.UTF_8 ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible to save one copy if you open a response Writer and write a resulting string directly.
Note that Jetty uses encoding ContentType - so we will be fine.
To get really mad about performance we can use JsonWriter but it would complicate the code

@rymsha rymsha merged commit 9ba531b into master Mar 8, 2023
@rymsha rymsha deleted the issue-10067 branch March 8, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants