public String getString()

in src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java [376:415]


        public String getString(String bundleName, Locale locale, String key) {
            String value;

            if (locale == null) {
                locale = getLocale(null);
            }

            ResourceBundle rb = getBundle(bundleName, locale);
            value = getStringOrNull(rb, key);

            if (value == null) {
                // try to load default
                value = i18nOriginal.getString(bundleName, locale, key);
            }

            if (!value.contains("${")) {
                return value;
            }

            final RegexBasedInterpolator interpolator = new RegexBasedInterpolator();
            try {
                interpolator.addValueSource(new EnvarBasedValueSource());
            } catch (final IOException e) {
                // In which cases could this happen? And what should we do?
            }

            interpolator.addValueSource(new PropertiesBasedValueSource(System.getProperties()));
            interpolator.addValueSource(new PropertiesBasedValueSource(project.getProperties()));
            interpolator.addValueSource(new PrefixedObjectValueSource("project", project));
            interpolator.addValueSource(new PrefixedObjectValueSource("pom", project));
            interpolator.addValueSource(new PrefixedObjectValueSource("settings", settings));

            try {
                value = interpolator.interpolate(value);
            } catch (final InterpolationException e) {
                // What does this exception mean?
            }

            return value;
        }