ClassPathResource factory and JarResource Factory

This is dangerous.  If you need an ArrayList, then create a copy of the list instead of casting it.  Otherwise, just declare the type of entries to be an ArrayList so that only ArrayLists can be passed in.