17:1-2 The urgency with which David called on God to heed his petition suggests that he was in a very difficult situation. He claimed to be representing a just cause as he made his request, and he assured God he was speaking the truth in what he was about to say. He visualized God as the celestial Judge and asked for a fair ruling in his court.
17:3 David was not asking for acceptance by God because of his own righteousness. He claimed that in the present conflict in which evil people were opposing him he had done nothing worthy of their antagonism. God had examined David's attitudes as well as his actions and had no basis for passing judgment against him. Furthermore David had previously made a strong commitment not to sin.
17:4-5 David also claimed to have kept free from sinners' ways with the help of God's Word. He had pursued God's revealed way to live consistently.