Community
Participate
Working Groups
Got a warning message when edit a program with ArrayList as below: ArrayList fileQueue = new ArrayList(); fileQueue.add(new File(startDir)); The warning message is: Unsafe type operation: Should not invoke the method add(E) of raw type ArrayList. References to generic type ArrayList<E> should be parameterized. NOTE: The program was successfully compiled using ant Eclipse 3M9 with Cheetah on Windows XP SP1. Eclipse is started with jre 1.4.2_03
This is just a warning indicating you that you are using generic types without specifying type arguments. ArrayList is now meant to be used as: ArrayList<File> in your example. See the 1.5 spec draft about these. You can turn off this optional warning in the compiler preference page (under 1.5 tab).