tballison commented on PR #2962:
URL: https://github.com/apache/tika/pull/2962#issuecomment-5038706477
My agent recommends these four small changes.
```
1. Kill the duplicated constant. Change
PipesConfig.DEFAULT_MAX_IPC_PAYLOAD_BYTES = 100L * 1024 * 1024 to reference
PipesMessage.MAX_PAYLOAD_BYTES
directly, so the "must stay equal" invariant is compiler-enforced instead
of comment-enforced. (Do before merge.)
2. Add a JSON-invalid-value load test. Load
{"pipes":{"maxIpcPayloadBytes":0}} through PipesConfig.load and assert it
throws. This locks in that
Jackson binds via the validating setter — behavior that's otherwise
invisible and would silently break if the mapper's visibility config ever
changed. (Do before merge.)
3. Unify how the limit is accessed. PipesClient caches it into a private
final field; ConnectionHandler and PipesServer call
pipesConfig.getMaxIpcPayloadBytes() inline. Pick one for consistency
(dropping the field matches the other two). (Polish.)
4. Add a one-line javadoc note that the limit is a hard,
connection-terminating check that must be configured identically on both ends,
and is
startup-only (restart to change). (Polish.)
```
wdyt?
--
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]