groovy

Add support for coercing strings to enum classes with "as" keyword

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.5.2
  • Component/s: groovy-jdk
  • Labels:
    None
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

It would be cool if the "as" keyword could be used to coerce strings to enum values. Since this currently throws an exception, adding this functionality should have no impact on existing code.

Activity

Hide
Paul King added a comment -

Should be in r10236. Thanks for the patch.

Show
Paul King added a comment - Should be in r10236. Thanks for the patch.
Hide
Paul King added a comment -

close off release 1.5.4

Show
Paul King added a comment - close off release 1.5.4

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: