Skip to content

Conversation

@antagoony
Copy link
Contributor

🤔 What's changed?

Following your response this MR optionally injects the locale information of the current Feature/Pickle into the custom @DefaultParameterTransformer method.

This is done by adding support for two more method signatures as proposed by this response of cucumber/cucucmber-expressions#376.

⚡️ What's your motivation?

See issue "Getting knowledge about the current Locale within any custom @DefaultParameterTransformer" (cucumber/cucumber-expressions#376).

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

I am not sure if adding a note within the CHANGELOG is sufficient enough.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.


@Override
public ParameterByTypeTransformer parameterByTypeTransformer(Locale locale) {
return (fromValue, toValueType) -> execute(fromValue, toValueType, locale);
Copy link
Contributor

Choose a reason for hiding this comment

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

This puts state in an otherwise stateless component.

@mpkorstanje mpkorstanje self-requested a review November 25, 2025 20:42
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