Skip to content

清理代码#6180

Open
CiiLu wants to merge 1 commit into
HMCL-dev:mainfrom
CiiLu:lang
Open

清理代码#6180
CiiLu wants to merge 1 commit into
HMCL-dev:mainfrom
CiiLu:lang

Conversation

@CiiLu

@CiiLu CiiLu commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Wulian233

Wulian233 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

你好——我已经审查了你的改动,一切看起来都很棒!


捂脸 对 HMCL 社区项目是免费的——如果你觉得我的代码审查有帮助,欢迎分享 ✨
帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈改进之后的代码审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Wulian is free for HMCL Community - if you like my reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Screenshot_2026-06-15-21-07-44-59_9d26c6446fd7bb8e41d99b6262b17def.jpg

@CiiLu CiiLu closed this Jun 19, 2026
@CiiLu CiiLu reopened this Jun 19, 2026
@Glavo

Glavo commented Jun 19, 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 cleans up imports and removes unused utility methods across several files, including introducing static imports for settings and logging. The review feedback advises against the introduction of wildcard imports (such as org.jackhuang.hmcl.setting., org.jackhuang.hmcl.game., and java.util.*) in order to comply with the Google Java Style Guide and maintain code readability.

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 HMCL/src/main/java/org/jackhuang/hmcl/Launcher.java
import org.jackhuang.hmcl.game.RuledArgument;
import org.jackhuang.hmcl.game.StringArgument;
import org.jackhuang.hmcl.game.Version;
import org.jackhuang.hmcl.game.*;

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.

medium

根据 Google Java 编程风格指南(Google Java Style Guide)第 3.3.1 节的规定,不应使用通配符导入(Wildcard imports)。在此处将具体的类导入替换为通配符导入 import org.jackhuang.hmcl.game.*; 会降低代码的可读性和可维护性,并且可能导致命名冲突。建议恢复为原有的具体类导入。

Suggested change
import org.jackhuang.hmcl.game.*;
import org.jackhuang.hmcl.game.Argument;
import org.jackhuang.hmcl.game.Arguments;
import org.jackhuang.hmcl.game.Artifact;
import org.jackhuang.hmcl.game.AssetIndexInfo;
import org.jackhuang.hmcl.game.CompatibilityRule;
import org.jackhuang.hmcl.game.DownloadType;
import org.jackhuang.hmcl.game.GameJavaVersion;
import org.jackhuang.hmcl.game.Library;
import org.jackhuang.hmcl.game.OSRestriction;
import org.jackhuang.hmcl.game.RuledArgument;
import org.jackhuang.hmcl.game.StringArgument;
import org.jackhuang.hmcl.game.Version;
References
  1. Google Java Style Guide Section 3.3.1: Wildcard imports, static or otherwise, are not used. (link)

import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.*;

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.

medium

根据 Google Java 编程风格指南(Google Java Style Guide)第 3.3.1 节的规定,不应使用通配符导入(Wildcard imports)。在此处将具体的类导入替换为通配符导入 import java.util.*; 会降低代码的可读性和可维护性。建议恢复为原有的具体类导入。

Suggested change
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
References
  1. Google Java Style Guide Section 3.3.1: Wildcard imports, static or otherwise, are not used. (link)

@Minecraft269

Copy link
Copy Markdown

gemini hyw这不就是为了少写点东西吗 怎么还给加回去了

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.

4 participants