Becareful!!, this is what i encounter today, what a stupid “If statement” i created….ai..do you seen what error below?

1
2
3
4
5
if(this.putNode(estraierFts, ftsUrlSync));
{
	//delete record after update
	ftsUrlSyncBO.deleteFtsUrlSync(ftsUrlSync.getId());
}

Above statement compile successfully in Java, what i trying want to do is , when condition true, it will delete my records. However with above statement, it will delete my record no matter condition true or false. This is funny, did you notice what error above? …. haha notice carefully , “;” after a “If statement”..what a stupid mistake i made.. TT…. my eyes are blur…take a rest first

Correct statement should be following

1
2
3
4
5
if(this.putNode(estraierFts, ftsUrlSync))
{
	//delete record after update
	ftsUrlSyncBO.deleteFtsUrlSync(ftsUrlSync.getId());
}
Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~