<< Rawls' position as I recall is that laws are justified in utilitarian terms but
the particular decision of a judge should be based upon the retributive view
. . .
(See Rawls' TWO CONCEPTS OF RULES) >>
This is pre-Rawls Rawls, a 1955 paper, well antedating the (decidedly non-utilitarian work that makes Rawls a really major thinker.
--jks