That's ridiculous. Proposing a nonsense solution certainly doesn't risk giving anything away. (You claim that there is a 100% likelihood the warden will cooperate and put the names in the boxes the prisoners request?)
If you think there's something wrong with the solution provided, why not just come out with it, and write "SPOILER WARNING" before it? I suspect you're misunderstanding something, though.