President Trump appears to have had good reason to be angry at James Comey.

Comey and the FBI he ran were clearly happy to make all sorts of things public through various means, but what they refused to say out loud was that Trump was not under investigation. Comey's reasons for declining to make the truth public don't hold up, especially in the midst of a flood of FBI leaks that harmed the president.

From the moment it become known publicly that federal investigators were looking into Russian meddling in the election, suspicion rained down on Trump. But in January, Comey told him he was not the target. In March, Comey confirmed to a Senate committee that the FBI was investigating possible Russian coordination with the Trump campaign. Afterward, Trump called Comey and implored him to make public what he had confirmed to the Senate leadership, that Trump wasn't a target.

On May 3, Sen. Richard Blumenthal asked Comey if the FBI has "ruled out" Trump "as potentially a target of that criminal investigation," and Comey refused to answer. Blumenthal followed up, saying, "So potentially, the president of the United States could be a target of your ongoing investigation into the Trump campaign's involvement with Russian interference in our election, correct?"

"I don't want to answer that," Comey replied.

Shortly thereafter, Trump fired Comey.

Why wouldn't Comey tell the public what he would tell senators confidentially and had repeatedly told Trump?

In his prepared statement for Thursday's hearing, Comey explains that he didn't want to say publicly that Trump was not a target "because it would create a duty to correct, should that change."

Comey reaffirmed that reasoning twice in Thursday's hearing. The idea is that if he stays mum about Trump not being a target, it would be proper to stay mum if Trump became a target. If he revealed that there was no there there, that Trump was not a target, then he'd have to go public if that were to change and Trump became one.

If you accept this standard, which had compelled Comey to announce in late October 2016 that he had found new Hillary Clinton emails on Anthony Weiner's laptop, then Comey's decision not to go public on Trump looks entirely political rather than legal. His reason was simply that complying with the president's request and declaring that Trump was not being investigated might require an embarrassing correction later.

But embarrassing for whom? Obviously, the principal embarrassment of a later correction would have been Trump's. So, surely it was appropriate, if the president was willing to take that risk, for the FBI director to comply with his boss's simple request. What was Comey doing making the decision to deny the president this declaration, especially with every other piece of information about the investigation being leaked. Every bit that could appear to inculpate Trump was made public. The one crucial detail that suggested the president's innocence was kept a closely guarded secret.

Why should the FBI director care about protecting Trump from potential bad press in the future?

He hinted another reason was that he wanted to avoid a repeat of the wounds he suffered the previous October from his public declarations about Hillary Clinton's emails. When Sen. Marco Rubio asked why he wouldn't clear Trump's name, Comey said, "It creates a duty to correct, which I've lived before." Later, on a similar question, Comey made a similar comment and an exasperated eye roll, as if to say, "Man, that sucked."

No doubt the experience was terrible. Clinton blamed Comey for swinging the election to Trump. Comey testified in May that the possibility of his influencing an election made him "mildly nauseous."

Avoiding the risk of a relapse into that mild nausea (or whatever other unpleasantness might come Comey's way), however, is not a good reason to refuse to say publicly what was true and what he would say privately — that Trump was not a target.

After Trump fired Comey, the press treated it as impossible that Comey might have told Trump he was not a target. An Associated Press story called Trump's claim "questionable" and quoted federal prosecutors saying it "wouldn't happen."

The media speculated on an investigation into Trump and laughed off his claim that Comey told him he was no target. But Trump has now been shown to be right. Comey has not shown any good reason for withholding the truth. Trump had good reason to be angry.