Skip to content

Simplify the matching logic in PropertiesFileTransformer#2027

Merged
Goooler merged 1 commit into
mainfrom
g/20250515/clean-up-for-trans
May 15, 2026
Merged

Simplify the matching logic in PropertiesFileTransformer#2027
Goooler merged 1 commit into
mainfrom
g/20250515/clean-up-for-trans

Conversation

@Goooler
Copy link
Copy Markdown
Member

@Goooler Goooler commented May 15, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors PropertiesFileTransformer.canTransformResource to simplify the matching logic used to decide whether a given resource path should be merged as a properties file.

Changes:

  • Replaced multiple early returns and loops with a single when expression.
  • Uses any { ... } for regex-based matching against mappings keys and paths entries.
  • Preserves the default fallback behavior (*.properties when both mappings and paths are empty).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Goooler Goooler changed the title Clean up PropertiesFileTransformer Simplify the matching logic in PropertiesFileTransformer May 15, 2026
@Goooler Goooler enabled auto-merge (squash) May 15, 2026 10:22
@Goooler Goooler disabled auto-merge May 15, 2026 10:29
@Goooler Goooler merged commit 6eef3dd into main May 15, 2026
10 checks passed
@Goooler Goooler deleted the g/20250515/clean-up-for-trans branch May 15, 2026 10:29
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