In my JAVA program, i have this “if” condition :
if( (!pccoNettNoAff && !transOPCVM && !garantie)
&& ( (pccoCourant == null)
|| ( (pccoCourant != null && rBale.getPcco() != null)
&& ( (pccoCourant.getId() != rBale.getPcco().getId())
|| ( pccoCourant.getId() == rBale.getPcco().getId()
&& tauxCourant!=null && rBale.getTauxCcf()!=null
&& rBale.getPartenaire()==null
&& rBale.getTauxCcf()!=tauxCourant
)
)
)
)
)
{
We can translate this in logic by :
Legend : T=true and F=False : They are the result of each test
((T) AND ((F) OR ((T) AND ((F) OR (F)))))
So my final result is obviously False (the Eclipse debug mode find the same result)
But my program is going trough this “if” anyway.
I have really not ideas why this is happening, maybe there is some sort of limitation in a “if” condition ??
If anyone have any ideas, please help me 🙂
Regards,
Cytemax
Tks for all your answers
I just transform my condition in several if and it seems to work perfectly 😉
So yes my first condition was too hard for one single line “if” condition ^^
Tks again
I must use this (rBale.getTauxCcf().compareTo(tauxCourant))!= 0 instead of rBale.getTauxCcf() != tauxCourant. They are both of type Double and not double.I thinks that’s a common mistake so tks for putting me on the wright track.
Regards,
Cytemax