I'm creating an ArrayList of type B:
ArrayList<B> cert= new ArrayList<B>;
B a = util.getCerts(path).iterator().next();
this.cert.add(a);
this.certNode(certs);
I'm getting a null pointer exception when I try to set the value:
void certNode(ArrayList<B> certResp)
{
ArrayList<RespNode> exp = new ArrayList<RespNode>();
for (int i = 0; i< certResp.size(); i++) {
exp.get(i).setxxx(certResp.get(i).getxxx());
exp.get(i).setxxx(certResp.get(i).getxxx().toString());
}
}
Any help would be great!
cert, but then you try to usethis.cert, which is not the same!