Skip to content

Rename ZIPCompressedMessage getter to getCompressionLevel and keep getLevel as deprecated bridge#2794

Closed
Copilot wants to merge 2 commits into
copilot/fix-zipcompressedmessage-compression-levelfrom
copilot/sub-pr-2783
Closed

Rename ZIPCompressedMessage getter to getCompressionLevel and keep getLevel as deprecated bridge#2794
Copilot wants to merge 2 commits into
copilot/fix-zipcompressedmessage-compression-levelfrom
copilot/sub-pr-2783

Conversation

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor

This stacked PR addresses review feedback on #2783 to make the ZIP compression API clearer without breaking callers. The getter is renamed to getCompressionLevel, while getLevel is retained as a deprecated compatibility path.

  • API update (ZIPCompressedMessage)

    • Introduced getCompressionLevel() as the primary instance getter.
    • Kept getLevel() as @Deprecated, delegating directly to getCompressionLevel().
    • Added Javadoc on getLevel() explicitly directing users to getCompressionLevel().
  • Internal call-site migration

    • Updated ZIPSerializer to use zipMessage.getCompressionLevel().
  • Test alignment + compatibility coverage

    • Updated existing assertions to call getCompressionLevel().
    • Added a focused test ensuring deprecated getLevel() returns the same value via delegation.
public int getCompressionLevel() {
    return compressionLevel;
}

/** @deprecated Use {@link #getCompressionLevel()}. */
@Deprecated
public int getLevel() {
    return getCompressionLevel();
}

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

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:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] [WIP] Address feedback: Rename method to getCompressionLevel and add deprecated getLevel Rename ZIPCompressedMessage getter to getCompressionLevel and keep getLevel as deprecated bridge May 21, 2026
Copilot AI requested a review from riccardobl May 21, 2026 17:11
@riccardobl riccardobl closed this May 21, 2026
@riccardobl riccardobl deleted the copilot/sub-pr-2783 branch May 28, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants