HSSF comparing cell value to string variable
I am iterating through an excel file using HSSF looking for a match to a string variable I've declared. Basically, if it finds a match I want the loop to stop and perform some other action. For some reason it never seems to find a match. I've debugged and placed a watch on both variables and as it loops it looks like to me the strings match but it keeps on going.
As it loops I get the contents of the cell using:
HSSFRichTextString cellText = cell.getRichStringCellValue();
String cellValue = cellText.getString().toLowerCase();
I then have an if statement:
if (cellValue == declaredString)
{
doSomething
{
What am I missing here? Does it have something to do with RichText?

