I have been thinking about this quite a bit lately. My impression is that Jean Valjean lied to Javert twice in the movie about coming back and turning himself in. The last time when he begs Javert as they are sword fighting that he will return before he falls into the river. My impression is that if that was really Valjean's intentions then he would have turned himself in after completing his task because he is a man of honor and does not need Javert's affirmation in order to do the "right" thing. Those quote marks kind of indicate why it's a lie... because turning himself in is not the right thing to do.
Javert is an ass that would imprison a man for life for stealing a loaf of bread. That I think is the crux of the movie/play/book, Javert is an ass that doesn't understand any sort of reason and feels himself as the judge, jury, and executioner of anyone. His definition of "the law" really meant what he personally felt as good or bad, not the definition of "the law" that we commonly understand. One loan cop is not the moral arbiter of right and wrong much less deciding the fate of another mans entire life. So in the end I feel like Valjean lied to Javert (twice). Javert was a man that couldn't be reasoned with; he had no ability to see past what he personally wanted to a greater truth. So I feel like Valjean lied to Javert (twice) out of necessity.
What ultimately lead Javert to his death was his inability to reconcile how this seemingly unrepentant criminal (which he had judged as completely horrible, deserving of a horrible life in prison) can do such righteous moral acts like saving a prostitute and then further saving her child. Javert is an example of a person with completely rigid thinking; which is maybe an example of how people thought in past ages.
So.... all in all Valjean lied to the law, but he had to because Javert was a huge jackass with unreasonable expectations. JUST BECAUSE IT'S a LAW DOES NOT MEAN THAT IT IS RIGHT. Valjean decided on what was ultimately right and that is why I love this story :)