Skip to content

fix: handle long in struct conversion - #2020

Merged
toddbaert merged 1 commit into
mainfrom
fix/convertvalue-long-support
Aug 27, 2026
Merged

fix: handle long in struct conversion#2020
toddbaert merged 1 commit into
mainfrom
fix/convertvalue-long-support

Conversation

@toddbaert

Copy link
Copy Markdown
Member

@toddbaert
toddbaert requested review from a team as code owners August 27, 2026 12:55
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1161c3bf-7e60-451a-a727-0b1414d45001

📥 Commits

Reviewing files that changed from the base of the PR and between be9c178 and 6a722a0.

📒 Files selected for processing (2)
  • src/main/java/dev/openfeature/sdk/Structure.java
  • src/test/java/dev/openfeature/sdk/StructureTest.java

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Structure.convertValue now preserves Long values as primitive long values. Tests verify direct conversion and preservation through asObjectMap.

Changes

Structure value conversion

Layer / File(s) Summary
Long value support
src/main/java/dev/openfeature/sdk/Structure.java, src/test/java/dev/openfeature/sdk/StructureTest.java
convertValue now handles Long values with longValue(). Tests verify values above Integer.MAX_VALUE through direct conversion and asObjectMap.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 6a722

This PR adds Long conversion support with corresponding test updates in a small, localized change; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: neagugeorgiana23, aepfli, chrfwow, justinabrahms

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description states that the change fixes a missed case and adds Long conversion. It directly matches the changeset.
Title check ✅ Passed The title clearly identifies the fix and the added long handling in struct conversion. It summarizes the main change.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@toddbaert toddbaert changed the title fix: handle long in strcut conversion fix: handle long in struct conversion Aug 27, 2026
* fixes a miss in #1985
* adds conversion to Long

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert
toddbaert force-pushed the fix/convertvalue-long-support branch from 6a722a0 to 96847e5 Compare August 27, 2026 12:56
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.27%. Comparing base (be9c178) to head (96847e5).

Files with missing lines Patch % Lines
src/main/java/dev/openfeature/sdk/Structure.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2020      +/-   ##
============================================
+ Coverage     92.52%   93.27%   +0.75%     
- Complexity      728      732       +4     
============================================
  Files            60       60              
  Lines          1739     1741       +2     
  Branches        202      203       +1     
============================================
+ Hits           1609     1624      +15     
+ Misses           80       69      -11     
+ Partials         50       48       -2     
Flag Coverage Δ
unittests 93.27% <50.00%> (+0.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@toddbaert
toddbaert merged commit 9a26a51 into main Aug 27, 2026
10 of 11 checks passed
@toddbaert
toddbaert deleted the fix/convertvalue-long-support branch August 27, 2026 13:06
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.

4 participants