You can see everything in the attachment.
The line in green fails because "value" variable has a strange value. It should be something like "key" variable.
Thank you so so much.
ps. I've been 4 hours and counting with this. I can't take it anymore.
Printable View
You can see everything in the attachment.
The line in green fails because "value" variable has a strange value. It should be something like "key" variable.
Thank you so so much.
ps. I've been 4 hours and counting with this. I can't take it anymore.
I wish I could help you, but I left my crystal ball at work. Sorry.
This is the code that fails:
if (cantidadesAlimentos != null){
Iterator mapIterator = cantidadesAlimentos.entrySet().iterator();
for (int i = 0; i < cantidadesAlimentos.size(); i++){
Map.Entry entry = (Map.Entry) mapIterator.next();
String key = entry.getKey().toString();
String value = entry.getValue().toString();
if(key.compareTo("recalcular") != 0){
fails here>>>> double limiteVariable = (Double.valueOf(value).doubleValue()) / 100;
motorPL.setBounds(motorPL.getNameindex(key, false), limiteVariable, limiteVariable);
}
}
}
this map comes from a JSP:
Map<String, String> cantidadesAlimentos = null;
if (!session.isNew()){
cantidadesAlimentos = request.getParameterMap();
}
The program fails where shown. The variable "key" is OK, it contains "11547" but the variable "value" contains "String[1] (id=142)" (well, when converted to a string it is something else), where it should be "30".
I can see the value 30 expanding the contents of "key". But I couldn't get it out of there
getValue() is returning an array of strings, so:
String value = ((String[])entry.getValue())[0];
More specifically it's returning a String array of one item.