title: typeMismatch.java.util.List when trying to set a list
body: <p>I am trying to set a <code>List&lt;Long&gt;</code> to an Java object.</p>
  
  <p>The set function is:</p>
  
  <pre><code>ResponseEntity&lt;String&gt; response = bcInsertService.addNewClip(new PrmBcClipInsert()
      .setTags(Arrays.asList(new Long[]{5L, 3L}))
  );
  </code></pre>
  
  <p>And the object is</p>
  
  <pre><code>public class PrmBcClipInsert implements Serializable {
  
      @ApiModelProperty(required = true)
      private List&lt;Long&gt; tags;
  
      public List&lt;Long&gt; getTags() {
          return tags;
      }
  
      public PrmBcClipInsert setTags(List&lt;Long&gt; tags) {
          this.tags = tags;
          return this;
      }
  }
  </code></pre>
  
  <p>This is BcInsertService:</p>
  
  <pre><code>public class BcInsertService extends RestTemplate {
      private static final Logger log = LoggerFactory.getLogger(BcInsertService.class);
  
      public ResponseEntity&lt;String&gt; addNewClip(PrmBcClipInsert prmBcClipInsert) {
          HttpHeaders headers = new HttpHeaders();
          headers.setContentType(MediaType.MULTIPART_FORM_DATA);
          MultiValueMap&lt;String, Object&gt; map= new LinkedMultiValueMap&lt;String, Object&gt;();
          HttpEntity&lt;MultiValueMap&lt;String, Object&gt;&gt; request = new HttpEntity&lt;MultiValueMap&lt;String, Object&gt;&gt;(prmBcClipInsert.getParameters(), headers);
  
          ParameterizedTypeReference&lt;StandardResponse&gt; typeRef = new ParameterizedTypeReference&lt;StandardResponse&gt;() {};
          ResponseEntity&lt;String&gt; response = this.postForEntity( "http://localhost:8080/bc/add-clip", request , String.class );
          log.info(response.toString());
          return response;
      }
  
  }
  </code></pre>
  
  <p>And it returns an error:</p>
  
  <blockquote>
    <p>Field error in object 'prmBcClipInsert' on field 'tags': rejected
    value [[5,3]]; codes
    [typeMismatch.prmBcClipInsert.tags,typeMismatch.tags,typeMismatch.java.util.List,typeMismatch];
    arguments
    [org.springframework.context.support.DefaultMessageSourceResolvable:
    codes [prmBcClipInsert.tags,tags]; arguments []; default message
    [tags]]; default message [Failed to convert property value of type
    'java.lang.String' to required type 'java.util.List' for property
    'tags'; nested exception is java.lang.NumberFormatException: For input
    string: "[5,3]"]</p>
  </blockquote>
  
  <p>Why the method doesn't accept a list even though it says that it accepts a list?</p>