Yosef Karo, The Laws of Insects that are in Water…
“ All types of fruit where it is their norm to be wormy while they are attached, he may not eat until he checks the fruit from the inside. Maybe there is a worm in it. And if the fruit waited after it was picked, for 12 months, he may eat without an inspection, because any creature that has no bone in it does not survive for 12 months. Nevertheless, he needs to check them to throw away the worms that are found between them on the outside, or on top of the fruit. ”
