Legislation aimed at preventing attacks on federal judges by giving them control over online posting of their addresses could be ineffective and might help cover up judicial misconduct, some observers warn.

Bills in the U.S. Congress and in the New Jersey Legislature would give federal judges and certain others the right to demand redaction of their personal information from government and private-sector websites. But critics say ordering websites to remove judges’ personal information is an ineffective approach and that the legislation could make it harder for the media to report on bad actors in the judiciary.