jsp - Vector : References to generic type Vector<E> should be parameterized -


i have problem(yellow line) in jsp file caused eclipse program keep no responding. although program can run, how can rid of following line of code.

enter image description here

vector vfieldname       = (vector) session.getattribute("table_vfieldname_"+table_type); vector vtable           = session.getattribute("table_vtable_"+table_type) == null ? new vector(): (vector) session.getattribute("table_vtable_"+table_type);     (int k=0;k<vtable.size();k++) {    intseqno=vtable.size();    vector vrow  = (vector) vtable.elementat(k);        } 

i don't think these warnings hang ide, these harmless. , best practice specify type generics vectar<object> or vectar<string> or list<string> or arraylist<string> etc , not use raw types.

please read updated sources , books. era of java-8 , not java-1!

anyways if still want rid of these warnings then:

  1. right click on project
  2. go properties
  3. search "jsp"
  4. select jsp syntax , scroll down java shown:

    project properties/preferences jsp

  5. click on error/warnings shown

  6. scroll down generic types , select "ignore" usage of raw types shown:

    generic types settings project

  7. apply, rebuild project , done.

also side suggestion, better use arraylist or other lists instead of vectar. see this answer why not use vectar.

also avoid using java code as possible in jsps though might necessary in case can avoid. use or instead.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -