7 Replies Latest reply on Mar 23, 2007 2:06 PM by 807606

    ArrayList and toArray()


      I have an ArrayList:

      ArrayList<javax.mail.SearchTerm> terms = new ArrayList<javax.mail.SearchTerm>();

      I add terms to this list and then try to build an AndTerm():

      SearchTerm query = new AndTerm((SearchTerm[]) terms.toArray());

      It compiles fine but Tomcat barfs.

      Thanks in advance.