-
Notifications
You must be signed in to change notification settings - Fork 1.5k
deps: update org.ow2.asm:asm to version 9.8 for java 25 support
#4418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps: update org.ow2.asm:asm to version 9.8 for java 25 support
#4418
Conversation
…`org.ow2.asm:asm` to version 9.8.
Summary of ChangesHello @armsargis, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on maintaining compatibility and modernizing API usage within the project. It updates a core dependency, Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Summary of ChangesHello @armsargis, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on maintaining compatibility and modernizing API usage. It updates a core dependency, Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Summary of ChangesHello @armsargis, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request ensures the project remains compatible with the latest Java advancements by updating a critical bytecode manipulation dependency, Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the org.ow2.asm:asm dependency to version 9.8 to add support for Java 25. It also replaces the deprecated getNextTarEntry() method with getNextEntry() across the codebase. The changes are correct and improve the code by using an up-to-date API. I have one suggestion to improve code consistency and readability.
| for (TarArchiveEntry entry = tarArchiveInputStream.getNextEntry(); | ||
| entry != null; | ||
| entry = tarArchiveInputStream.getNextTarEntry()) { | ||
| entry = tarArchiveInputStream.getNextEntry()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with other parts of the codebase and for better readability, this for loop can be converted to a while loop. The while ((entry = ...getNextEntry()) != null) pattern is more idiomatic for iterating through archive entries.
TarArchiveEntry entry;
while ((entry = tarArchiveInputStream.getNextEntry()) != null) {There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly updates the org.ow2.asm:asm dependency to version 9.8, which adds support for Java 25. It also replaces the deprecated getNextTarEntry method with getNextEntry across the codebase. The changes are straightforward and well-executed. I have one minor suggestion to improve code consistency.
| for (TarArchiveEntry entry = tarArchiveInputStream.getNextEntry(); | ||
| entry != null; | ||
| entry = tarArchiveInputStream.getNextTarEntry()) { | ||
| entry = tarArchiveInputStream.getNextEntry()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better readability and consistency with other parts of the codebase (e.g., ReproducibleImageTest.java), consider refactoring this for loop into a while loop. The while ((entry = ...)) {} pattern is more idiomatic in Java for this type of iteration.
TarArchiveEntry entry;
while ((entry = tarArchiveInputStream.getNextEntry()) != null) {There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the ASM dependency to version 9.8 to add support for Java 25 and replaces the deprecated getNextTarEntry method with getNextEntry. The changes are correct and follow the pull request's intent. I have one suggestion in TarExtractor.java to refactor a loop for better readability and consistency with the rest of the codebase.
| for (TarArchiveEntry entry = tarArchiveInputStream.getNextEntry(); | ||
| entry != null; | ||
| entry = tarArchiveInputStream.getNextTarEntry()) { | ||
| entry = tarArchiveInputStream.getNextEntry()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this for loop is correct, it can be simplified into a more idiomatic while loop. This would also make it consistent with other parts of the codebase where TarArchiveInputStream is used (for example, in ReproducibleImageTest.java).
Consider refactoring this loop to:
TarArchiveEntry entry;
while ((entry = tarArchiveInputStream.getNextEntry()) != null) {
// ... loop body
}|
Could someone please review this and merge it? Thank you. |
|
Please don't abandon the project |
87b4c0e
into
GoogleContainerTools:master
|
Thank you @armsargis for the fix. |
org.ow2.asm:asm to version 9.8 for java 25 supportorg.ow2.asm:asm to version 9.8 for java 25 support
|
@armsargis @diegomarquezp See: https://docs.oracle.com/javase/specs/jls/se25/html/jls-12.html#jls-12.1.4
This should be changed as well: jib/jib-core/src/main/java/com/google/cloud/tools/jib/api/MainClassFinder.java Lines 126 to 135 in 87b4c0e
A main class can now look like this: void main() {
System.out.println("Hello, World!");
}More details can also be found in JEP 512 Also, asm 9.9 is out by now and should be used. |
|
@ML-Marco Since this pull request is already merged and closed, it might be a good idea to create a new issue (and optionally a pull request?) for adding support for the additional I believe this pull request should already support existing code bases that upgrade to Java 25 from a previous Java version. |
|
@diegomarquezp |
org.ow2.asm:asm to version 9.8 for java 25 supportorg.ow2.asm:asm to version 9.8 for java 25 support
Updated
org.ow2.asm:asmto version 9.8 for java 25 support and replace deprecatedgetNextTarEntrywithgetNextEntryBEGIN_COMMIT_OVERRIDE
deps: update org.ow2.asm:asm to version 9.8 for java 25 support
END_COMMIT_OVERRIDE
Fixes #4417🛠️