A quick post -- my humanities professor used Harry Potter as a literary example of justice.
We were discussing the legend of the king Gyges who as a shepherd found a magic ring that made him invisible, and quickly overthrew the current king and slept with his wife. Then the argument is made that the only cause of justice is the fear of getting caught. Remove that fear and the just and unjust person will act the same.
Yet Harry Potter had the same power to become invisible, and over a 7-year span, he didn't let it corrupt him.
That seems to be one of the main themes of the series: the uncorruptedness of a pure human soul. Harry is directly contrasted with Tom Riddle; they both experienced a very similar and trying childhood, yet their reactions to these hardships is vastly different. In the end, Harry's purity of soul conquers the force of evil.