Skip to content

fix: use default license loading method#736

Open
mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
mhduiy:license
Open

fix: use default license loading method#736
mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
mhduiy:license

Conversation

@mhduiy
Copy link
Contributor

@mhduiy mhduiy commented Mar 26, 2026

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

@mhduiy mhduiy requested a review from 18202781743 March 26, 2026 08:05
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
@deepin-ci-robot
Copy link
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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.

3 participants