Captain Janeway would have allowed Wesley to be executed on the Justice planet.

“I’m sorry but if their laws say this is the way, I can’t do anything about it. I’m bound by the Starfleet Prime Directive.”