Make ZIPCompressedMessage compression level instance-scoped while preserving (deprecated) legacy static API#2783
Conversation
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/52dd3a6c-82f7-4d23-8ba2-a85f8b13e5ac Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/52dd3a6c-82f7-4d23-8ba2-a85f8b13e5ac Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
ZIPCompressedMessage compression level instance-scoped while preserving legacy static API
| * | ||
| * @param level The level. | ||
| */ | ||
| public static void setLevel(int level) { |
There was a problem hiding this comment.
@copilot deprecate this and suggest the use of the non-static method
There was a problem hiding this comment.
Done in 17a995e: ZIPCompressedMessage.setLevel(int) is now deprecated and its JavaDoc points to the non-static setCompressionLevel(int) method.
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/bbfe269e-4cd7-4d65-adc9-240b6260bd76 Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
ZIPCompressedMessage compression level instance-scoped while preserving legacy static APIZIPCompressedMessage compression level instance-scoped while preserving (deprecated) legacy static API
There was a problem hiding this comment.
@copilot rename this to getCompressionLevel method, then create a new getLevel that is deprecated and points to getCompressionLevel. Mention in its javadoc to use getCompressionLevel
There was a problem hiding this comment.
Implemented in this PR: getCompressionLevel() is now the primary method, and deprecated getLevel() forwards to it with JavaDoc guidance. Added compatibility assertions in tests in aee9c45.
|
@riccardobl I've opened a new pull request, #2794, to work on those changes. Once the pull request is ready, I'll request review from you. |
@copilot , just apply these patches to this pr... |
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/08ec37e2-ef3d-45a6-ad4c-89f1bcdf477d Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/08ec37e2-ef3d-45a6-ad4c-89f1bcdf477d Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Applied directly to this PR as requested. Latest commits are d9133c2 and aee9c45. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
ZIPCompressedMessagecurrently stores compression level in static state, so constructing/configuring one message can unintentionally affect others. This change scopes compression level to each message instance while keeping legacy behavior for older call sites and on-wire compatibility.Compression level state model
compressionLevel.setLevel(int)as a default-setting API for newly created messages.Backward compatibility
ZIPSerializerbehavior unchanged), so peers on older versions can still parse messages.ZIPCompressedMessage.setLevel(...)continue to work as a global default for future instances.API/docs cleanup
setCompressionLevel(int)for explicit instance-level configuration.setLevel(int)and updated JavaDoc to direct users tosetCompressionLevel(int).getCompressionLevel()as the primary instance getter.getLevel()as a deprecated compatibility alias that forwards togetCompressionLevel(), with JavaDoc guidance to migrate.Focused regression coverage
getLevel()remains compatible and delegates consistently togetCompressionLevel()> [!WARNING]
>
>