I get the following warning
Note: com.......\BeerSelect.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
I have specified the type as well.. I would like to know the reason rather than using the @SupressWarning option.
I checked the other threads as well What causes javac to issue the "uses unchecked or unsafe operations" warning
The below is the piece of code..
package com.example.web;
import com.example.model.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class BeerSelect extends HttpServlet{
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
String c = request.getParameter("color");
BeerExpert be = new BeerExpert();
List<String> result = be.getBrands(c);
ServletContext sc = this.getServletConfig.getServletContext();
request.setAttribute("styles",result);
RequestDispatcher view = getServletConfig.getServletContext().getRequestDispathcer("result.jsp");
view.forward(request,response);
}
}
Any sort of help is appreciated.. Thanks