That's been the policy in the past. Which is why a restore is always recommended. A restore wipes the jailbreak.
Just be certain if you do this that you put the phone in DFU mode first. A plain vanilla restore from iTunes or even worse, from the phone itself (Erase All Contents and Settings) will put the phone into a bootloop.
Note that Apple is not so picky lately. One user here has reported getting service on a JB iPhone. The policy appears to have shifted to Apple having to prove that your jailbreak has caused the problem before they can deny you warranty.
An out of warranty repair doesn't even matter though. They will simply ask you to restore before doing any work.