This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The query is supposed to return a integer value. If the requestIdentifier is absent in the table it will return a NULL object(as per ibatis doc).
Can the result of IF statement be true if the value returned by query is NULL?
NullPointer exception will only be thrown if the query returns null as null type will casted to Integer, and then before return , unboxed to int, which will throw an exception.
But for this to happen the IF statement needs to evaluate to true. How it evaluates to true.
I understand that multiple calls to the same method in if statement are not proper; but need to root cause this;