private void populateThemeModules() { if (serviceInfo.getThemesDir() == null) { serviceInfo.setThemesDir(AmbariMetaInfo.SERVICE_THEMES_FOLDER_NAME); } String themesDir = serviceDirectory.getAbsolutePath() + File.separator + serviceInfo.getThemesDir(); if (serviceInfo.getThemes() != null) { for (ThemeInfo themeInfo : serviceInfo.getThemes()) { File themeFile = new File(themesDir + File.separator + themeInfo.getFileName()); ThemeModule module = new ThemeModule(themeFile, themeInfo); themeModules.put(module.getId(), module); } } // lets not fail if theme contain errors }