Skip to content

Review fixes for testing-apps:testing-webapp#18119

Merged
trask merged 1 commit into
mainfrom
otelbot/code-review-testing-apps-testing-webapp
Apr 21, 2026
Merged

Review fixes for testing-apps:testing-webapp#18119
trask merged 1 commit into
mainfrom
otelbot/code-review-testing-apps-testing-webapp

Conversation

@otelbot

@otelbot otelbot Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Updated the two testing-webapp servlets to write directly to the container-managed HttpServletResponse writer instead of closing it with try-with-resources. Mandatory metadata.yaml validation also found an out-of-scope JMX config metadata gap.

Applied Changes

General

File: JakartaSimpleServlet.java:20
Change: Replaced the try-with-resources block around resp.getWriter() with a direct resp.getWriter().write("hello!") call and removed the unused PrintWriter import.
Reason: Repository review guidance prioritizes safe resource-handling fixes; container-managed servlet response writers should not be explicitly closed, and the simplified form matches existing servlet patterns in this repository.

File: JavaxSimpleServlet.java:20
Change: Replaced the try-with-resources block around resp.getWriter() with a direct resp.getWriter().write("hello!") call and removed the unused PrintWriter import.
Reason: Repository review guidance prioritizes safe resource-handling fixes; container-managed servlet response writers should not be explicitly closed, and the simplified form matches existing servlet patterns in this repository.

Unresolved Items

File: metadata.yaml
Reason: Mandatory metadata.yaml validation found that the JMX module uses otel.jmx.enabled, otel.jmx.config, otel.jmx.target.system, and otel.jmx.discovery.delay, but metadata.yaml contains no corresponding config entries.


Download code review diagnostics

Automated code review of instrumentation/jmx-metrics/testing-apps/testing-webapp.
@otelbot otelbot Bot requested a review from a team as a code owner April 21, 2026 19:15
@trask trask merged commit 243a888 into main Apr 21, 2026
96 checks passed
@trask trask deleted the otelbot/code-review-testing-apps-testing-webapp branch April 21, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant