improve the code of getFullBundleNameFromResource method.
foreach element seems to be useless