Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-992

Set modifiable List to fields in var-args mutator method for model of List to enable the fields to mutate

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 1.0.0.Final
    • 2017.2.0
    • config-api
    • None

    Description

      The var-args mutator for some models whose type is List sets Unmodifiable List(jva.util.Arrays$ArrayList) to the field like the following.

      /**
       * The handlers associated with the root logger.
       */
      @SuppressWarnings("unchecked")
      public T handlers(String... args) {
        handlers(Arrays.asList(args));
        return (T) this;
      }
      

      If the field(in this case, handlers) initialize as java.util.Arrays$ArrayList, we can't add elements to the field.

      Attachments

        Activity

          People

            Unassigned Unassigned
            emag_jira Yoshimasa Tanabe (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: