if (order.getOrderCode() == null)
{
simpleOrder = true;
}
else
{
if (order.getOrderCode().length() == 0)
{
simpleOrder = true;
}
}
{
simpleOrder = true;
}
else
{
if (order.getOrderCode().length() == 0)
{
simpleOrder = true;
}
}
Refactor.
Note: There are plenty of libraries that offer very good single static operations to replace the if condition, but that's not important right now.