“The law is stupid, but I have to follow it”: So said Manhattan Supreme Court Justice Maxwell Wiley moments before releasing without bail suspects charged with burglary and robbery.

A growing chorus of New Yorkers and law enforcement folks believe, like Judge Wiley, that the criminal justice reforms that fully kick in Jan. 1 go “against all common sense and wisdom.”

Courts are in the process of case-by-case reviews that by New Year’s Day will release at least 3,800 people from county jails across the state. Some officials estimate that a quarter to a third of their jail populations will be back on the street. The city’s looking at about 900 releases, with an estimated 170 defendants sprung on Staten Island alone.

Meanwhile, the District Attorneys Association of the State of New York estimates that prosecutors’ offices (excluding those in the city) need $100 million for extra staff and other resources to comply with the new discovery rules passed into law along with the no-bail change — rules that, among other things, greatly increase the chances for witness intimidation.

New NYPD Commissioner Dermot Shea worries that will discourage New Yorkers from even speaking to police; the no-bail rules worry him, too.

Indeed, law enforcement leaders across the state have called for a rethinking of the reforms — including funding as well as some new provision so that judges can still set bail when the accused presents a clear threat to public safety.

Yet Gov. Andrew Cuomo and the Legislature’s top leaders refuse to do anything at all before January, if then. Pray they act before some horror clearly linked to these reforms forces them to change their minds.