TRENTON, N.J. (CBSNewYork) — New Jersey lawmakers have passed a bill aimed a protecting judges. It comes just months after a deadly shooting at the home of a federal judge.

Daniel’s Law is named after the son of Judge Esther Salas.

READ MORE: Boat Operators Must Now Take Mandatory Boating Safety Course Under Brianna's Law

Daniel Anderl, 20-year-old son of federal Judge Esther Salas, was shot to death inside their North Brunswick home.

He was killed and Salas’ husband was wounded by a gunman who showed up a their Middlesex County house back in July.

RELATED: Judge Esther Salas Says She’s Forgiven Man Who Killed Her Son In Attack On Her Home

READ MORE: Bronx District Attorney Says 3 NYPD Officers Did Not Use Excessive Force In 16-Year-Old's Arrest

The legislation prohibits home addresses and phone numbers of judges and prosecutors from being posted online.

Authorities say that’s how the shooter found Salas’ home.

MORE FROM CBS NEW YORK

MORE NEWS: NYPD Hate Crimes Task Force Investigating Attack On 48-Year-Old Asian Man In Hell's Kitchen

You can get the latest news, sports and weather on our brand new CBS New York app. Download here.