Skip to content

[Chores] Addon 和 Modpack 相关类向记录类的转换#6275

Open
ToobLac wants to merge 6 commits into
HMCL-dev:mainfrom
ToobLac:record/addon&modpack
Open

[Chores] Addon 和 Modpack 相关类向记录类的转换#6275
ToobLac wants to merge 6 commits into
HMCL-dev:mainfrom
ToobLac:record/addon&modpack

Conversation

@ToobLac

@ToobLac ToobLac commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@ToobLac ToobLac marked this pull request as ready for review June 30, 2026 08:58
ToobLac added 3 commits June 30, 2026 17:01
# Conflicts:
#	HMCL/src/main/java/org/jackhuang/hmcl/game/ModpackHelper.java
#	HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameItem.java
@Glavo

Glavo commented Jun 30, 2026

Copy link
Copy Markdown
Member

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread HMCLCore/src/main/java/org/jackhuang/hmcl/download/forge/ForgeInstallProfile.java Outdated
ToobLac added 2 commits June 30, 2026 21:05
# Conflicts:
#	HMCLCore/src/main/java/org/jackhuang/hmcl/addon/meta/ForgeNewModMetadata.java
#	HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/curse/CurseInstallTask.java
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