A Philadelphia woman who brought her gun into New Jersey will go to trial under the state's gun laws.

The fact that Shaneen Allen is a 27-year-old mother of two with no criminal history and that she had a Pennsylvania permit to carry the weapon has some people calling this a miscarriage of justice.

It's not. Not yet anyway. And this is how the system works.

During a traffic stop on the Atlantic City Expressway on Oct. 1, Allen told a state trooper that she had a gun with her. She turned over the gun and some hollow-point bullets to him, police said. New Jersey law prohibits people from carrying concealed weapons without a permit, and New Jersey doesn't recognize permits issued by other states. Hollow-point bullets are also prohibited in this state.

Allen was charged by Atlantic County Prosecutor Jim McClain, and this week Superior Court Judge Michael Donio denied a motion to drop the charge. The case will go to trial in October.

Both McClain and Donio were doing what they are supposed to do - apply the law as it is written. There's nothing unusual or outrageous about that. This is how the competing claims under our criminal justice system are sorted out. The judge and a jury will decide Allen's ultimate fate. And if the initial reports about the case are borne out, we certainly don't think Allen belongs in jail.

But under 2008 changes to the state's Graves Act - which was originally intended to crack down on gangs - Allen could face a mandatory sentence of three years in prison if she is found guilty.

That's the problem with mandatory-sentencing laws - they are popular with legislators who want to be seen as tough on crime, but they don't allow for judicial discretion in unusual cases.

Allen could possibly be granted a waiver to the mandatory sentence if she is found guilty. But her case should inspire lawmakers to revisit the 2008 expansion of the Graves Act. Certainly, mandatory sentences should not apply in a case like Allen's.

In fact, lawmakers should stop the use of mandatory sentences altogether.

We've got no problem with New Jersey enforcing its strict gun laws - or with New Jersey not honoring other states' gun permits. New Jersey laws would be meaningless if they were superseded by laws in other states.

And we see no reason to carve out an exception to the state's gun-possession laws for people who unwittingly bring weapons with them when visiting resort areas such as Atlantic City.

Gun owners have a responsibility to know the laws of any state into which they intend to bring a weapon. Taking a gun across state lines should never be a casual decision.

Having said that, judges should be free, when imposing a sentence, to take the particulars of a case into account.

Gun-rights proponents are outraged by this case. But the problem is the mandatory-sentencing aspect, not New Jersey's gun-permit laws or the prosecutor's decision - actually, his responsibility - to apply them.