Well, I'm not sure either, but this is what I did...

  /* copy random terminals to ordered list and drop duplicates */
    for (int i = 0; i < nTerm; i++) {
      d =  (int) tL.get(i); 
      if (oList[d] == d) return DUP_TERMINAL;
      oList[d] = d;
tL is the list from getting the tree terminals

ArrayList tList = getTreeTerminals(((GPIndividual) ind).trees[0],

which is being done in evaluate()

I'm looking at trees and finding out which terminals have been created by the 
ERCs, then I assign a fitness based on that. I haven't gotten to testing this 
part yet, but I no longer get a compiler warning.

>Not sure how you're trying to cast an ERC into an int, but okay.