fix: use default license loading method#736
Open
mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
Open
fix: use default license loading method#736mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
Conversation
Changed the loadLicense() method to always use loadDefault() instead of conditionally loading from content or path variables. This simplifies the license loading logic and ensures consistent behavior regardless of whether content or path was previously set. The previous implementation had conditional logic that would load license from either content string or file path. This has been replaced with a direct call to loadDefault() which presumably loads a built- in or default license file. This change makes the license loading more predictable and removes potential error conditions related to missing content or invalid paths. fix: 使用默认许可证加载方法 将 loadLicense() 方法改为始终使用 loadDefault(),而不是根据条件从内容或 路径变量加载。这简化了许可证加载逻辑,并确保无论之前是否设置了内容或路 径,都能保持行为一致。 之前的实现有条件逻辑,会从内容字符串或文件路径加载许可证。现在已替换为直 接调用 loadDefault(),该方法可能加载内置或默认的许可证文件。此更改使许可 证加载更加可预测,并消除了与缺失内容或无效路径相关的潜在错误条件。 PMS: TASK-387863
18202781743
approved these changes
Mar 27, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the loadLicense() method to always use loadDefault() instead of conditionally loading from content or path variables. This simplifies the license loading logic and ensures consistent behavior regardless of whether content or path was previously set.
The previous implementation had conditional logic that would load license from either content string or file path. This has been replaced with a direct call to loadDefault() which presumably loads a built- in or default license file. This change makes the license loading more predictable and removes potential error conditions related to missing content or invalid paths.
fix: 使用默认许可证加载方法
将 loadLicense() 方法改为始终使用 loadDefault(),而不是根据条件从内容或 路径变量加载。这简化了许可证加载逻辑,并确保无论之前是否设置了内容或路
径,都能保持行为一致。
之前的实现有条件逻辑,会从内容字符串或文件路径加载许可证。现在已替换为直
接调用 loadDefault(),该方法可能加载内置或默认的许可证文件。此更改使许可
证加载更加可预测,并消除了与缺失内容或无效路径相关的潜在错误条件。
PMS: TASK-387863