请帮忙,我在以下代码中收到以下消息:
listaFinal = (ArrayList<PuntoNota>) getIntent().getSerializableExtra("miLista");
AdapterDatos adapter = new AdapterDatos(this, listaFinal);
PuntoNota.java
public class PuntoNota implements Serializable{
private String punto;
private String nota;
public PuntoNota (String punto, String nota){
this.punto = punto;
this.nota = nota;
}
public String getPunto(){
return punto;
}
public String getNota(){
return nota;
}
}
AdapterDatos:
public AdapterDatos(Context context, ArrayList<PuntoNota> puntoNotaList) {
this.context = context;
this.puntoNotaList = puntoNotaList;
}
应用程序运行良好,但我收到以下消息:
未经检查的强制转换:将 'java.io.Serializable' 转换为 'java.util.ArrayList' less ... (Ctrl + F1)。
关于此代码:(ArrayList ) getIntent().getSerializableExtra("myList"); 是否建议删除或隐藏此消息?