I am new to the Generics scene so I don't understand what the problem is.
Given the following code:
public static ArrayList<String> removeRecursivePages(ArrayList<String> alPages)
{
if (alPages == null)
{
return null;
}
ArrayList<String> alReturn = (ArrayList<String>)alPages.clone();
I get the following warning at the last line:
Rules.java:198: warning: [unchecked] unchecked cast
found : java.lang.Object
required: java.util.ArrayList<java.lang.String>
ArrayList<String> alReturn = (ArrayList<String>)alPages.clone();
1 warning
I am compiling using NetBeans 5.0 on JDK 1.5.0_06.
My unit tests come out just fine, so it runs like it should, it just gets annoying every time I compile to see the warning.
Any ideas?
Thanks.