Closed rajadilipkolli closed 2 months ago
The changes involve the introduction of an init.gradle
file that configures the project to use the OpenRewrite plugin for code refactoring. Additionally, various Java classes have been updated to replace standard list access methods with more specialized methods for retrieving the first or last elements of collections, enhancing code structure and readability.
File Path | Change Summary |
---|---|
init.gradle |
New file establishing Gradle build script with OpenRewrite plugin configuration and dependencies. |
src/main/java/com/learning/mfscreener/mapper/MfSchemeEntityToDtoMapper.java |
Replaced get(0) with getFirst() for accessing the first element in a collection. |
src/main/java/com/learning/mfscreener/service/FIFOUnitsService.java |
Replaced get(index) with getFirst() for accessing the first element in a list. |
src/main/java/com/learning/mfscreener/service/NavService.java |
Replaced get(0) with getFirst() for accessing the first element in a list. |
src/main/java/com/learning/mfscreener/service/XIRRCalculatorService.java |
Replaced get(0) with getFirst() for accessing the first transaction in the list. |
src/main/java/com/learning/mfscreener/utils/XirrCalculatorHelper.java |
Replaced get(size - 1) with getLast() for accessing the last element in a list. |
src/test/java/com/learning/mfscreener/utils/TestData.java |
Replaced get(0) with getFirst() for accessing the first element in collections. |
sequenceDiagram
participant User
participant Service
participant Data
User->>Service: Request data
Service->>Data: Get first element
Data-->>Service: Return first element
Service-->>User: Return data
🐰 In a world of code so bright,
I hop and skip with pure delight.
WithgetFirst()
now in play,
My code's more clear, hip-hip-hooray!
No more indices to confuse,
Just simple calls, I've got the moves! 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Improvements
getFirst()
andgetLast()
for collections.Bug Fixes