title: ClassCastException in Java 11
body: <p>I have a JPA entity corresponding to a table in a database in which I have following</p>
  
  <pre><code>@Type(type = "jsonb")
  @Column(name = "detail", columnDefinition = "jsonb")
  private List&lt;CustomObject&gt; customObjectList;
  </code></pre>
  
  <p>The detail column in the database is of type JSON, and the entry for the column in the database looks like:</p>
  
  <pre><code>[
    {
      "field1": "1",
      "field2":"2"
    },
    {
      "field1": "3",
      "field2": "5"
    },
    {
      "field1": "4",
      "field2": "6"
    }
  ]
  </code></pre>
  
  <p>Where <code>field1</code> and <code>field2</code> are attributes of <code>customObject</code>.</p>
  
  <p>But, when I fetch them using a GET API, it gives me a class cast exception
  Something like </p>
  
  <pre><code>LinkedHashMap cannot be converted to List&lt;CustomObject&gt;.
  </code></pre>
  
  <p>Any suggestion how to resolve it?</p>