Well my problem is that I trying to store the value of it.next in a variable and I have not been successful yet. When I try this:
strguid = (String) it.next();
I get this which does not have any specific exception message.
I am a newbie so my apologies if I am not detailing this problem more.
This is the full block of code. I think all is coming down from a map type:
Map attrs = (Map) map.get(SAML2Constants.ATTRIBUTE_MAP); if (attrs != null) { out.println("<tr>"); out.println("<td valign=top><b>Attributes: </b></td>"); Iterator iter = attrs.keySet().iterator(); out.println("<td>"); String strguid = "*"; while (iter.hasNext()) { String attrName = (String) iter.next(); Set attrVals = (HashSet) attrs.get(attrName); Object[] hashArray = attrVals.toArray(); strguid = hashArray.toString(); if ((attrVals != null) && !attrVals.isEmpty()) { Iterator it = attrVals.iterator(); while (it.hasNext()) { out.println(attrName + "=" + it.next() + "<br>"); strguid = (Object) it.next().toString(); //I also tried this strguid = (String) it.next(); and it does not work. } } }