Skip to content

NLIC-2515 Add DiscountService#61

Open
v-rudkovskiy wants to merge 2 commits into
masterfrom
RVA/NLIC-2515/Implement-Discounts-Licensing-Model
Open

NLIC-2515 Add DiscountService#61
v-rudkovskiy wants to merge 2 commits into
masterfrom
RVA/NLIC-2515/Implement-Discounts-Licensing-Model

Conversation

@v-rudkovskiy

Copy link
Copy Markdown
Member

No description provided.

@v-rudkovskiy v-rudkovskiy requested a review from kkorotkov May 11, 2026 11:05
@v-rudkovskiy v-rudkovskiy self-assigned this May 11, 2026
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 24d5056.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@v-rudkovskiy v-rudkovskiy requested a review from kkorotkov June 29, 2026 14:12
Comment on lines +197 to +199
if (isNotFound(e)) {
return null;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This belongs to the business logic. If null is a legitimate response, the REST interface should handle it gracefully as well. Otherwise, the contract diverges between the Java binding and the REST interface.

* @throws NetLicensingException
* any non-not-found service error
*/
public static LicenseTemplate resolveDiscount(final Context context, final String productNumber,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended for direct use by vendors?


private static boolean isNotFound(final ServiceException e) {
return (e.getStatusCode() == HTTP_STATUS_NOT_FOUND)
|| StringUtils.startsWith(e.getMessage(), NOT_FOUND_EXCEPTION_PREFIX);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated method: StringUtils.startsWith

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