Hello,
I'm comparing values of an excel sheet to record values returned from a database and one record is passing through the if statement when it should fail the if statement.
The if statement looks like this:
if (record.value.equals(cellVal) == false)
{
record.value = cellVal
record.modifyUser = userId
//dataService.updateManualEntry(record)
println "UPDATING ${record.value.equals(cellVal)}"
println "record value: ${record.value}"
updatedCount++
}else{
println "NOT UPDATING [ [ ${record.value.length()} ] + [${cellVal.length()}]"
}
}
The println shows that the value of println "UPDATING ${record.value.equals(cellVal)}"
evaluates to be true, in which case I don't understand why it is passing through the if statement. In addition the length of the string is 0.
Can I get a second pair of eyes and figure out why a true value would get through this if statement?