Bonjour, jai un petit probleme asser urgent
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 public void execute(Sendable obj) { PlayerInformationList list = (PlayerInformationList) obj; Iterator<PlayerInformation> it = list.getPinfo().iterator(); while (it.hasNext()) { PlayerInformation p = it.next(); //erreur ici ... }
PlayerInformationList contient une ArrayList<PlayerInformation>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 Exception in thread "Thread-1" java.lang.ClassCastException: java.lang.Integer cannot be cast to com.gubix.shared.PlayerInformation at com.gubix.bsclient.socket.ClientProtocol.execute(ClientProtocol.java:38)
getPinfo() renvoie l'arraylist en question
Je ne comprend pas très bien le rapport du Integer dans l'exception...
peut etre que quelqu'un a un idée??
Merci d'avance !
Partager