Skip to content

fix: call apply() instead of transform() in transformNegatedConstraint#110

Merged
mlopezFC merged 1 commit intomasterfrom
fix-109
Mar 18, 2026
Merged

fix: call apply() instead of transform() in transformNegatedConstraint#110
mlopezFC merged 1 commit intomasterfrom
fix-109

Conversation

@javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented Mar 17, 2026

Close #109

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced constraint handling logic to properly process negated constraints in backend operations.

@sonarqubecloud
Copy link

@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 40cd391a-15e0-4997-88c9-88d8971a0f5b

📥 Commits

Reviewing files that changed from the base of the PR and between 39116c3 and 96fc8b5.

📒 Files selected for processing (1)
  • backend-core-data-impl/src/main/java/com/flowingcode/backendcore/dao/jpa/ConstraintTransformerJpaImpl.java

Walkthrough

Modified ConstraintTransformerJpaImpl to call apply() instead of transform() when building negated predicates. This ensures unsupported constraints throw a proper ConstraintTransformerException rather than causing a NullPointerException when transform() returns null.

Changes

Cohort / File(s) Summary
Error handling in constraint negation
backend-core-data-impl/src/main/java/com/flowingcode/backendcore/dao/jpa/ConstraintTransformerJpaImpl.java
Changed transformNegatedConstraint to invoke apply(c.getConstraint()) instead of transform(c.getConstraint()), ensuring unsupported constraints trigger descriptive exception handling rather than null reference propagation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing transform() with apply() in transformNegatedConstraint method.
Linked Issues check ✅ Passed The change directly addresses issue #109 by replacing transform() with apply() in transformNegatedConstraint to throw ConstraintTransformerException instead of NullPointerException for unsupported constraints.
Out of Scope Changes check ✅ Passed The change is narrowly focused on fixing the specific issue in transformNegatedConstraint with a single method call replacement, containing no out-of-scope modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-109
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

@javier-godoy javier-godoy marked this pull request as ready for review March 17, 2026 20:03
Copy link
Member

@mlopezFC mlopezFC left a comment

Choose a reason for hiding this comment

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

LGTM

@mlopezFC mlopezFC merged commit 2420c3f into master Mar 18, 2026
3 checks passed
@mlopezFC mlopezFC deleted the fix-109 branch March 18, 2026 21:38
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.

transformNegatedConstraint uses transform() instead of apply()

2 participants