navinko opened a new pull request, #9603: URL: https://github.com/apache/ozone/pull/9603
## What changes were proposed in this pull request? - Fixed Prometheus servlet token parsing throws StringIndexOutOfBoundsException - Added new Test class for PrometheusServlet (Success + Failure cases) ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-14149 ## How was this patch tested? Did repro and validated the fix by hitting /prom. Before : > 2026-01-07 15:53:06,973 [qtp2086062353-90] WARN server.HttpChannel: /prom 2026-01-07T15:53:06.977807589Z java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 6 2026-01-07T15:53:06.977817214Z at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55) After: > No error in om logs The exact message as mentioned in description "java.lang.StringIndexOutOfBoundsException: begin 7, end 6, length 6`" is specific to substring logic for jdk17 . In jdk8 and 21 will have Range [7, 6) out of bounds for length 6 Tested with new junit test cases . CI: https://github.com/navinko/ozone/actions/runs/20793198532 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
