Revert "[MOSIP-44617] Fixed "Mandatory fields are missing" error in sendNotifications API"#1034
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
…endNotif…" This reverts commit 4bb882a. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
fd12d3b to
2bcb756
Compare
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
`@pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/service/util/NotificationServiceUtil.java`:
- Around line 138-145: The deserialization currently uses HashMap.class and
assigns to Map<String, String>, which fails when notificationDtoData contains
nested objects; change the objectMapper.readValue call to deserialize into a
Map<String, Object> (use TypeReference<Map<String,Object>> with objectMapper) so
nested structures are preserved, then continue converting each entry's value to
NotificationDTO via objectMapper.convertValue(notificationDtoDataEntryValue,
NotificationDTO.class) before populating KeyValuePairDto (langaueNamePair) and
adding to langaueNamePairs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e6583397-0f8a-4ec6-8dce-992839c873c4
📒 Files selected for processing (1)
pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/service/util/NotificationServiceUtil.java
…endNotif…" (mosip#1034) This reverts commit 4bb882a. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
Reverts #1032
Summary by CodeRabbit