2 Kings 22:2
And he did that which was right in the sight of the LORD, and walked in all the way of David his father, and turned not aside to the right hand or to the left. And he did that which was right in the sight of the LORD, and walked in all the way of David his father, and turned not aside to the right hand or to the left.
Josiah feared God and did what was right in His sight, walking fully in all the way of David without deviating to the right hand or to the left. He took this course from the very beginning of his reign, though he was only eight years old when he came to the throne, and he continued it through a thirty-one-year reign. He was born to a wicked king, with his father and his grandfather sunk in sin and degradation, and he was beset with temptations to follow in his father's steps amid surrounding wickedness. He had few counselors to encourage him in the right way.
Warned by the errors of past generations, he refused to descend to the low level to which his father and grandfather had descended and would not repeat their sins. Instead, as one to occupy a position of trust, he resolved to honor God, to obey the instruction given for the guidance of Israel's rulers, and to walk uprightly. His steady obedience honored God and made it possible for God to give him grace and to use him as a chosen vessel unto honor. That faithful course gave those who had maintained purity of faith hope that the downward course of the kingdom was checked.
The verse teaches the duty to resolve to walk uprightly before God, especially when entrusted with responsibility and a position of trust. It shows the safety of such a course. Josiah stands as a model of doing what was right and remaining faithful without turning aside, calling for a firm stand for what is right and joining the needed work of reformation. Applied to the church, that example means confession, humility, and a decisive break with sin.