Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-2776

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M5
    • Fix Version/s: 2.0.0-M6
    • Component/s: Isis Core
    • Labels:
      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

          Activity

            People

            • Assignee:
              danhaywood Daniel Keir Haywood
              Reporter:
              danhaywood Daniel Keir Haywood

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment