Judges will violate your rights when they think they can get away with it. Not just gun rights either. Judges respond to incentives, too, and there isn't too much keeping them accountable. It is good that our judges are generally decent folks, isn't it? That almost certainly includes the one described at this link. I'm sure he thought he was doing the best thing.