Skip to content

FINERACT-1897: Fix NPE when requestedShares is null during share acco…#5652

Merged
adamsaghy merged 1 commit intoapache:developfrom
SamaSVM:FINERACT-1897/fix-npe-share-account-creation
Apr 2, 2026
Merged

FINERACT-1897: Fix NPE when requestedShares is null during share acco…#5652
adamsaghy merged 1 commit intoapache:developfrom
SamaSVM:FINERACT-1897/fix-npe-share-account-creation

Conversation

@SamaSVM
Copy link
Copy Markdown
Contributor

@SamaSVM SamaSVM commented Mar 19, 2026

Description

Null Long unboxing in arithmetic comparison (requestedShares < minimumClientShares) caused NPE before the validation error list was checked, returning HTTP 500 instead of HTTP 400. Added null guard on both min/max comparisons so validation completes normally and the client receives a proper 400 response.

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@SamaSVM SamaSVM force-pushed the FINERACT-1897/fix-npe-share-account-creation branch from c5c8f65 to 367ee14 Compare March 19, 2026 13:23
@SamaSVM SamaSVM force-pushed the FINERACT-1897/fix-npe-share-account-creation branch from 367ee14 to 40d49f4 Compare March 19, 2026 14:19
@adamsaghy adamsaghy merged commit 089afe7 into apache:develop Apr 2, 2026
59 of 60 checks passed
@SamaSVM SamaSVM deleted the FINERACT-1897/fix-npe-share-account-creation branch April 3, 2026 05:34
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