Senate Minority Leader Chuck Schumer, D-N.Y., served on the Judiciary Committee in 2009. During the confirmation for Supreme Court nominee Sonia Sotomayor, Schumer said that even in “hot-button cases,” judges should follow the law even if it results in rulings against so-called sympathetic litigants.”

That’s an important principle to follow as the Senate considers Judge Brett Kavanaugh’s Supreme Court nomination.

Sotomayor herself embraced this principle, saying that even if a party’s position is “sympathetic,” the judge must do “what the law requires” and reach “the result [that] is commanded by law.” In other words, the law, not the judge, must determine how each case is decided.

This is easier said than done, especially in the tough cases that can present a conflict between what the judge’s head knows the law requires and what the judge’s heart wants to do. Kavanaugh has had some of those tough cases in his 12 years on the bench. I wrote about one of those cases in a previous post.

Another tough case was SeaWorld of Florida v. Perez (2014). During a live performance at SeaWorld in Orlando, Florida, a trainer drowned when a killer whale grabbed and pulled her into the pool.

The secretary of labor concluded that SeaWorld had violated federal law by exposing trainers to the “recognized hazards” of drowning and injury when working with killer whales. An administrative law judge agreed.

SeaWorld appealed to Kavanaugh’s court, which has jurisdiction over many federal government agencies.

The court majority agreed with the secretary of labor, but Kavanaugh dissented, noting the obvious fact that “[m]any sports and entertainment shows can be extremely dangerous for the participants.” When something like this happens, there may be an urgent feeling that “someone has to do something about this,” but the legal question, Kavanaugh wrote, is who really has the authority to determine that “the risk to participants is too high?”

The sports and entertainment industries themselves obviously have a big responsibility. If government must get involved, it’s important to determine which level of government—federal or state—and which branch of government— legislative, executive, or judicial—may appropriately get involved. More specifically, does the Department of Labor have the authority that it exercised here?

While federal law requires that employers provide a place of employment that is “free from recognized hazards,” Kavanaugh wrote, this does not include the power to define “the normal activities of sports events or entertainment shows.” Whether those normal activities are too dangerous or should be banned is a policy issue that the Department of Labor does not have authority to decide. In fact, the Department of Labor had never done so until this case.

The Department of Labor had previously denied that it could exercise this authority by, for example, regulating tackling in the NFL or speed in NASCAR racing. How is contact between trainers and killer whales any less an ordinary activity in SeaWorld shows and, therefore, how could the Department of Labor exercise authority in this context if it had no authority in the others?

“In my view,” Kavanaugh wrote, “the Department of Labor either has authority to regulate sports and entertainment so as to prevent injuries to participants, or it does not.”

Kavanaugh concluded his dissent by distinguishing between the policy question of “whether SeaWorld—or for that matter the NFL or NASCAR—should be subject to more stringent government regulation or liability” and the legal question of whether the Department of Labor may provide the answer.

Could there be a less sympathetic litigant than a corporation suing to avoid being fined in connection with an employee’s death?

Like Sotomayor and Schumer insisted in 2009, however, a judge must follow the law even when his sympathies point in a different direction. That’s exactly the kind of judge Kavanaugh has been, and the kind of justice he will be.