Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
  • New Topic

Type safety: Unchecked cast from Object to List<String>

 
jazy smith
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all,

I have a jsp scriplet where i wrote this code

List<String> user = (List<String>)session.getAttribute("username") ;

but it says " Type safety: Unchecked cast from Object to List<String>" error. Any idea to resolve it ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.
 
    Bookmark Topic Watch Topic
  • New Topic