Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8356

Use javax.validation 2.0 API results in GroovyBugError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.12, 2.5.0-beta-2
    • Fix Version/s: 2.5.0-beta-2
    • Component/s: None
    • Labels:
      None

      Description

      If you use the javax.validation 2.0 API using certain annotations results in:

      BUG! exception in phase 'class generation' in source unit '.../validation/ValidatedSpec.groovy' unsupported Target TYPE_USE
      

      Example code:

      class Foo {
          String testMe(@Pattern(regexp = "\\d+") String number) {
              return number
          }
      }
      

      Seems https://github.com/apache/groovy/blob/GROOVY_2_5_X/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java#L327 needs updating for Java 8 `TYPE_USE`

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              graemerocher1 Graeme Rocher
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: