lukaszlenart commented on PR #1782: URL: https://github.com/apache/struts/pull/1782#issuecomment-5002414349
Good coverage point. The gap reduces to one invariant: with `StrutsJSONWriter` back on plain instance fields, WW-5644's response-side safety now depends solely on the `JSONWriter` bean staying `scope="prototype"`. I've guarded that directly rather than via a new accessor. `getWriter()` was declined earlier (adding a production accessor purely for tests), and a `JSONResult`-level test hits the same wall — `JSONResult` is framework-instantiated with only setters. So instead `JSONInterceptorTest#testObtainsFreshWriterPerAcquisition` asserts two `container.getInstance(JSONWriter.class)` lookups return distinct instances. That fails the build if the writer is ever switched to singleton or cached — the exact regression you described — and mirrors how the reader is already covered by `testObtainsFreshJSONUtilAndReaderPerInvocation`. No production API change needed. -- 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]
