public static String getYttCaption(Locale locale, YhteystietojenTyyppiDTO ytt) { String lang = locale.getLanguage().toLowerCase(); if (ytt.getNimi() == null) { return ""; } for (Teksti curTeksti : ytt.getNimi().getTeksti()) { if (curTeksti.getKieliKoodi().equals(lang)) {//getNimiFi() != null) { return curTeksti.getValue(); } } return getAvailableYttName(ytt); }