Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Aug 9, 2025

This pull request enhances the handling of primitive arrays in the PathExclude class and refactors test fixtures to use static factory methods for object creation, improving code clarity and maintainability. It also adds new fields to support primitive arrays in test data and updates related logic accordingly.

Core logic improvements

  • Improved handling of primitive arrays in PathExclude: Added isPrimitiveArray check to return primitive arrays directly, preventing casting errors and ensuring correct processing. [1] [2]
  • Refactored collection/array processing: Extracted logic for handling non-primitive arrays/collections into a new helper method addElementsToList, improving readability and separation of concerns. [1] [2]

Test fixture enhancements

  • Added static factory methods (e.g., of123, ofOrder123) to test classes and records (Address, Occupation, Order, Product) for more concise and reusable test object creation. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated UserDetail classes and records to use new factory methods and added a new scoresArray field to support primitive array testing. [1] [2]

Minor changes

  • Cleaned up unused imports in test fixture files for better code hygiene. [1] [2]

@petruki petruki self-assigned this Aug 9, 2025
@petruki petruki merged commit 364dc27 into master Aug 9, 2025
4 checks passed
@petruki petruki deleted the staging branch August 9, 2025 21:05
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