清理代码#6180
Conversation
|
你好——我已经审查了你的改动,一切看起来都很棒! 捂脸 对 HMCL 社区项目是免费的——如果你觉得我的代码审查有帮助,欢迎分享 ✨Original comment in EnglishHey - I've reviewed your changes and they look great! Wulian is free for HMCL Community - if you like my reviews please consider sharing them ✨ |
|
/gemini review |
There was a problem hiding this comment.
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.
| import org.jackhuang.hmcl.game.RuledArgument; | ||
| import org.jackhuang.hmcl.game.StringArgument; | ||
| import org.jackhuang.hmcl.game.Version; | ||
| import org.jackhuang.hmcl.game.*; |
There was a problem hiding this comment.
根据 Google Java 编程风格指南(Google Java Style Guide)第 3.3.1 节的规定,不应使用通配符导入(Wildcard imports)。在此处将具体的类导入替换为通配符导入 import org.jackhuang.hmcl.game.*; 会降低代码的可读性和可维护性,并且可能导致命名冲突。建议恢复为原有的具体类导入。
| 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
- 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.*; |
There was a problem hiding this comment.
根据 Google Java 编程风格指南(Google Java Style Guide)第 3.3.1 节的规定,不应使用通配符导入(Wildcard imports)。在此处将具体的类导入替换为通配符导入 import java.util.*; 会降低代码的可读性和可维护性。建议恢复为原有的具体类导入。
| 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
- Google Java Style Guide Section 3.3.1: Wildcard imports, static or otherwise, are not used. (link)
|
gemini hyw这不就是为了少写点东西吗 怎么还给加回去了 |

No description provided.