Thou hast proved mine heart; thou hast visited me in the night; thou hast tried me, and shalt find nothing; I am purposed that my mouth shall not transgress.
Thou hast proved mine heart,.... This properly belongs to God, who is the searcher of the heart and reins, and is desired by all good men; and though God has no need to make use of any means to know the heart, and what is in it; yet in order to know, or rather to make known, what is in the hearts of his people, he proves them sometimes by adversity, as he did Abraham and Job, and sometimes by prosperity, by mercies given forth in a wonderful way, as to the Israelites in the wilderness, Deuteronomy 8:2; sometimes by suffering false prophets and false teachers to be among them, Deuteronomy 13:3; and sometimes by leaving corruptions in them, and them to their corruptions, as he left the Canaanites in the land, and as he left Hezekiah to his own heart, Judges 2:22. In one or other or more of these ways God proved the heart of David, and found him to be a man after his own heart; and in the first of these ways he proved Christ, who was found faithful to him that appointed him, and was a man approved of God;
Thou hast visited me in the night; God visited and redeemed his people in the night of Jewish darkness; he visits and calls them by his grace in the night of unregeneracy; and so he visits with his gracious presence in the night of desertion; and he often visits by granting counsel, comfort, and support, in the night of affliction, which seems to be intended here; thus he visited the human nature of Christ in the midst of his sorrows and sufferings, when it was the Jews' hour and power of darkness. Elsewhere God is said to visit every morning, Job 7:18;
Thou hast tried me; as silver and gold are tried in the furnace; thus the people of God, and their graces in them, are tried by afflictions; so David was tried, and in this manner Christ himself was tried; wherefore he is called the tried stone, Isaiah 28:16;
and shalt find nothing; or "shalt not find": which is variously supplied; some "thy desire", or what is well pleasing to thee, so Jarchi; or "Thou hast not found me innocent", as Kimchi; others supply it quite the reverse, "and iniquity is not found in me", as the Septuagint, Vulgate Latin, and Ethiopic versions; or "Thou hast not found iniquity in me", as the Syriac and Arabic versions; to which agrees the Chaldee paraphrase, "and Thou hast not found corruption"; which must be understood, not as if there was no sin and corruption in David; for he often makes loud complaints and large confessions of his sins, and earnestly prays for the forgiveness of them; but either that there was no sin in his heart which he regarded, Psalms 66:18; which he nourished and cherished, which he indulged and lived in; or rather there was no such crime found in him, which his enemies charged him with; see Psalms 7:3. This is true of Christ in the fullest sense; no iniquity was ever found in him by God, by men or devils, John 14:30 1 Peter 2:22; and also of his people, as considered in him, being justified by his righteousness, and washed in his blood, Jeremiah 50:20; though otherwise, as considered in themselves, they themselves find sin and corruption abounding in them, Romans 7:18;
I am purposed that my mouth shall not transgress; by murmuring against God, on account of his visitation and fiery trials, or by railing at men for their false charges and accusations; this resolution was taken up by the psalmist in the strength of divine grace, and was kept by him, Psalms 39:9; so Christ submitted himself patiently to the will of God without repining, and when reviled by men reviled not again, Luke 22:42; and from hence may be learned, that the laws of God may be transgressed by words as well as by works, and that the one as well as the other should be guarded against; see Psalms 39:1.