Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Aug 10, 2025

This pull request refactors utility methods for extracting map, list, and array properties from objects, introduces a new path parsing utility, and improves modularity and test coverage. The most important changes are grouped below.

Utility Extraction and Refactoring

  • Moved mapFrom, listFrom, and arrayFrom methods from DotPathQL to a new utility class DotUtils, improving separation of concerns and making these utilities statically accessible. All usages throughout the codebase and documentation were updated to reference DotUtils instead of DotPathQL. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]

Path Parsing Feature

  • Added a new DotUtils.parsePaths method and supporting parser classes (PathParser, DotParse interface, and factory method in DotPathFactory) to robustly parse dot-notated path strings, including nested bracket expressions. This enables more advanced path parsing scenarios. [1] [2] [3] [4] [5] [6]

Documentation Updates

  • Updated the documentation in README.md to reflect the new usage of DotUtils for utility methods and introduced a new section describing the map object conversion and path parsing capabilities. [1] [2]

Test Improvements

  • Renamed UtilsTest.java to DotUtilsTest.java and added comprehensive tests for the new path parsing functionality, including edge cases and invalid input handling. Updated existing tests to use DotUtils instead of DotPathQL. [1] [2] [3] [4] [5] [6] [7]

Minor Cleanups

  • Removed unnecessary code and annotations, such as the @SuppressWarnings("unchecked") from DotPathQL, and cleaned up unused helper methods. [1] [2]

These changes make the codebase more modular, easier to maintain, and extend the functionality for path parsing and object property extraction.

@petruki petruki self-assigned this Aug 10, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 3fef38c into master Aug 10, 2025
7 checks passed
@petruki petruki deleted the staging branch August 10, 2025 22:12
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.

2 participants