1 Chronicles 22:6-11 (KJV)
6 Then he called for Solomon his son, and charged him to build an house for the Lord God of Israel. 7 And David said to Solomon, My son, as for me, it was in my mind to build an house unto the name of the Lord my God: 8 But the word of the Lord came to me, saying, Thou hast shed blood abundantly, and hast made great wars: thou shalt not build an house unto my name, because thou hast shed much blood upon the earth in my sight. 9 Behold, a son shall be born to thee, who shall be a man of rest; and I will give him rest from all his enemies round about: for his name shall be Solomon, and I will give peace and quietness unto Israel in his days. 10 He shall build an house for my name; and he shall be my son, and I will be his father; and I will establish the throne of his kingdom over Israel for ever. 11 Now, my son, the Lord be with thee; and prosper thou, and build the house of the Lord thy God, as he hath said of thee.
David declares to his son Solomon that he has been barred from building the house of God because he was a man of war. In verse 9, David states the the vision actually names Solomon directly. If you read the vision (2 Samuel 7) that Nathan had concerning the temple, we see there was no mention of Solomon nor any mention of David being a man of war.
Is David lying or was he just embelishing God's word because he was sincerely mistaken about the application of the vision?