Xlint:unchecked compilation error?
Hello,
when i try to compile the following code as part of a servlet application , the following Xlint:unchecked error occurs.I cant understand since I am using jdk1.5 or is it referring to generics in collections?if so could anyone pls reply how to fix it.Thanks in advance.
****************************************************************************
import java.util.*;
public class BeerExpert{
public List getBrands(String color) {
List brands = new ArrayList();
if(color.equals("amber"))
{
brands.add("Jack Amber");
brands.add("Red Moose");
}
else
{
brands.add("Jail Pale Aile");
}
return (brands);
}
}
**************************************************************************
C:\javac BeerExpert.java
Note: BeerExpert.java uses unchecked or unsafe operations.
Note :Recompile with -Xlint:unchecked for details.

