I have got 2 warning: -- The First is :
HELPDESKGESTION2\src\java\glpi\filter\LoginFilter.java:289: warning: [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
localParams.put(key, value);
^
--The Second is :
HELPDESKGESTION2\src\java\glpi\filter\LoginFilter.java:292: warning: [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
localParams.put(name, values);
^
The Code ho generate this warnings is :
public void setParameter(String name, String []values) {
if (debug) System.out.println("LoginFilter::setParameter(" + name + "=" + values + ")" + " localParams = "+ localParams);
if (localParams == null) {
localParams = new Hashtable();
// Copy the parameters from the underlying request.
Map wrappedParams = getRequest().getParameterMap();
Set keySet = wrappedParams.keySet();
for (Iterator it = keySet.iterator(); it.hasNext(); ) {
Object key = it.next();
Object value = wrappedParams.get(key);
localParams.put(key, value);
}
}
localParams.put(name, values);
}
Replace:
localParams = new Hashtable();
With:
localParams = new Hashtable<String,String>();
I assume you have a global variable like the following:
private Hashtable localParams;
Replace that with:
private Hashtable<String,String> localParams;
If you make the changes I suggested the warnings will go away but you will also have to replace all of your Object with String;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With