PropertiesFile (@NotNull PropertiesFile searchFile, @NotNull ResourceBundle resourceBundle) { final String targetSuffix = getPropertiesFileSuffix(searchFile, searchFile.getResourceBundle().getBaseName()); final String baseName = resourceBundle.getBaseName(); for (PropertiesFile propertiesFile : resourceBundle.getPropertiesFiles()) { if (getPropertiesFileSuffix(propertiesFile, baseName).equals(targetSuffix)) { return propertiesFile; } } return null; }