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

JSR308 annotation attributes not being validated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0-alpha-3
    • None

    Description

      //@Grab('net.jqwik:jqwik:1.1.4')
      import groovy.transform.CompileStatic
      import net.jqwik.api.ForAll
      import net.jqwik.api.Property
      import net.jqwik.api.constraints.IntRange;
      
      @CompileStatic
      class Jsr308 {
          @Property
          boolean 'size zero or positive'(
                  @ForAll() List<@IntRange(foo="") Integer> items // (1)
      //            @ForAll(foo="") List<@IntRange() Integer> items // (2)
          ) {
              items.size() >= 0
          }
      }
      

      Invalid annotation attributes stop (2) from compiling but (1) successfully compiles.

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              paulk Paul King
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: