Southern California state Sen. Ted Lieu, a reliable champion of press freedoms, deserves our gratitude and full credit for shepherding a bill through the Legislature that strengthens the California Shield Act. Gov. Jerry Brown was right to sign it into law.

The Shield Act is the California law that protects journalists from having to reveal unpublished information or their sources of information. It also requires that a journalist who is subpoenaed in a civil or criminal proceeding be given at least five days’ notice that his or her appearance will be required. This is to give the news organization time to present arguments to the court in support of its Shield Law rights.

But the U.S. Justice Department proved this year that there had not been enough protections. The FBI secretly seized phone records and emails from reporters at The Associated Press and Fox News, with no notice to those organizations that their records were being examined — and hence, no chance for the news organizations to argue that the information was protected or could be found in other ways by the FBI.

This might look like self-serving legislation for journalists, but it is not.

The problem is that government intrusion into newsgathering records can reveal how an investigation of the government was put together, and can reveal confidential sources of information, whose identity the news organization is duty-bound to protect.

That has a chilling effect on the willingness of sources to come forward, which in turn makes it more difficult for news organizations to report on the actions of government officials.

It is a manipulation of the system and provides a perverse incentive for government to keep tabs on current investigative reporting so as to lessen the possibility of future reporting on things that the public needs to know but are embarrassing to the government.

Lieu’s legislation amends the California Shield Act to cover the end-around the Justice Department used. It extends the five-day notice requirement to a news organization whose records are being subpoenaed from a third party, like the phone company or an Internet service. There’s an exception for “circumstances that pose a clear and substantial threat to the integrity of the criminal investigation or present an imminent risk of death or serious bodily harm.”

Again, the idea is to give the journalist time to cite Shield Act protections or to argue that the information could and should be obtained another way — or perhaps need not be obtained at all by the government.

In other words, it provides the proper time to allow the legal system work as it is designed.

In closed door talks, Sen. Dianne Feinstein agreed to a major new water policy for California that sells out the Delta and guts Endangered Species Act protections. Sen. Barbara Boxer is fighting the good fight to remove the rider from her comprehensive water infrastructure bill, but it may take a presidential veto.