Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2776

@Parameter(regex=...) does not allow for parameter to also be optional.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-M5
    • 2.0.0-M6
    • Core
    • None

    Description

      In other words, if null is provided then the regex fails.  It should just ignore.

      This shows up as a problem for the simple case, eg:

      `@Parameter(regex=..., optionality=OPTIONAL)`

      it also shows up in the case of a chained meta-annotation:

      @Parameter(regex=..., optionality=MANDATORY)
      public @interface Reference {}

      and

      @Parameter(optionality=OPTIONAL)
      @Reference
      public @interface VatCode {} 

      where we want parameters annotated with `@VatCode` to be optional, overriding the inherited mandatory from `@Reference`.

       

      Attachments

        Issue Links

          Activity

            People

              danhaywood Daniel Keir Haywood
              danhaywood Daniel Keir Haywood
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: