[Chores] Addon 和 Modpack 相关类向记录类的转换#6275
Conversation
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/game/ModpackHelper.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameItem.java
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors numerous metadata and configuration classes across the codebase into Java records to reduce boilerplate. However, the code review highlights critical issues that will prevent compilation and cause runtime failures. Specifically, several records explicitly define accessor methods with invalid @Override annotations, which will result in compilation errors. Additionally, because GSON is used for deserialization, missing fields in JSON or TOML payloads will inject null values into the records, leading to potential NullPointerExceptions. To resolve these issues, the invalid @Override annotations and redundant accessors should be removed, and compact constructors should be added to safely initialize potentially null collections and objects with default values.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
# Conflicts: # HMCLCore/src/main/java/org/jackhuang/hmcl/addon/meta/ForgeNewModMetadata.java # HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/curse/CurseInstallTask.java
No description provided.