Fix source generation in type conversion of data mapper#721
Fix source generation in type conversion of data mapper#721KavinduZoysa merged 2 commits intoballerina-platform:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughRefactors conversion-resolution in DataMapManager to use Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.40.5)flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/DataMapManager.javaComment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/DataMapManager.java`:
- Around line 1728-1745: In DataMapManager, the XML conversion match string is
wrong: update the xmlConversion comparator in findConvertedVariable to use the
actual Ballerina function prefix "xmldata:toXml(" + varName + ")" instead of
"xml:toXml(...)" so XML-converted variables are detected and unwrapped; apply
the same correction to the other identical match sites (the other occurrences in
this class, e.g., the comparisons created by addTypeConversion and the duplicate
match near the end of the file) so all places compare against
"xmldata:toXml(...)" consistently.
...-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/DataMapManager.java
Show resolved
Hide resolved
e267f01 to
abea417
Compare
Purpose
Addresses wso2/product-ballerina-integrator#2517
Summary
This pull request fixes source generation in type conversion within the data mapper component.
Changes Made
Outcome
These changes improve the accuracy and consistency of generated source for type conversions in the data mapper, ensuring converted variables are correctly identified and inserted in the generated code.