here is one example of the unwanted magic; here you should probably iterate the java way instead of converting the collection